Start Contact views
Fix chat bug view bug (resize issue)
|
|
@ -22,15 +22,10 @@
|
|||
|
||||
@interface ChatRoomTableViewController : UITableViewController {
|
||||
@private
|
||||
BOOL editMode;
|
||||
NSArray *data;
|
||||
NSString *remoteContact;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) NSString *remoteContact;
|
||||
|
||||
- (void) toggleEditMode;
|
||||
- (void) enterEditMode;
|
||||
- (void) exitEditMode;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -33,22 +33,14 @@
|
|||
data = [[ChatModel listMessages:remoteContact] retain];
|
||||
}
|
||||
|
||||
- (void) toggleEditMode {
|
||||
editMode = !editMode;
|
||||
[(UITableView*)[self view] reloadData];
|
||||
|
||||
#pragma mark - Property Functions
|
||||
|
||||
- (void)setRemoteContact:(NSString *)aremoteContact {
|
||||
self->remoteContact = aremoteContact;
|
||||
[[self tableView] reloadData];
|
||||
}
|
||||
|
||||
- (void) enterEditMode {
|
||||
if(!editMode) {
|
||||
[self toggleEditMode];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) exitEditMode {
|
||||
if(editMode) {
|
||||
[self toggleEditMode];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource Functions
|
||||
|
||||
|
|
@ -68,17 +60,13 @@
|
|||
}
|
||||
|
||||
[cell setChat:[data objectAtIndex:[indexPath row]]];
|
||||
if(editMode)
|
||||
[cell enterEditMode];
|
||||
else
|
||||
[cell exitEditMode];
|
||||
[cell update];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UITableViewelegate Functions
|
||||
#pragma mark - UITableViewDelegate Functions
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
UIChatRoomHeader *headerController = [[UIChatRoomHeader alloc] init];
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
[tableController release];
|
||||
[messageField release];
|
||||
[sendButton release];
|
||||
[editButton release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
@ -83,7 +84,7 @@
|
|||
name:@"LinphoneTextReceived"
|
||||
object:nil];
|
||||
|
||||
[tableController exitEditMode];
|
||||
[[tableController tableView] setEditing:FALSE];
|
||||
[editButton setOff];
|
||||
[[tableController tableView] reloadData];
|
||||
}
|
||||
|
|
@ -179,7 +180,7 @@
|
|||
}
|
||||
|
||||
- (IBAction)onEditClick:(id)event {
|
||||
[tableController toggleEditMode];
|
||||
[[tableController tableView] setEditing:![[tableController tableView] isEditing] animated:TRUE];
|
||||
}
|
||||
|
||||
- (IBAction)onSendClick:(id)event {
|
||||
|
|
|
|||
|
|
@ -21,12 +21,7 @@
|
|||
|
||||
@interface ChatTableViewController : UITableViewController {
|
||||
@private
|
||||
BOOL editMode;
|
||||
NSArray *data;
|
||||
}
|
||||
|
||||
- (void) toggleEditMode;
|
||||
- (void) enterEditMode;
|
||||
- (void) exitEditMode;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -28,13 +28,6 @@
|
|||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (id)init {
|
||||
if((self = [super init]) != nil) {
|
||||
self->editMode = false;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
if(data != nil)
|
||||
[data release];
|
||||
|
|
@ -50,23 +43,6 @@
|
|||
data = [[ChatModel listConversations] retain];
|
||||
}
|
||||
|
||||
- (void) toggleEditMode {
|
||||
editMode = !editMode;
|
||||
[(UITableView*)[self view] reloadData];
|
||||
}
|
||||
|
||||
- (void) enterEditMode {
|
||||
if(!editMode) {
|
||||
[self toggleEditMode];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) exitEditMode {
|
||||
if(editMode) {
|
||||
[self toggleEditMode];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource Functions
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
|
|
@ -88,10 +64,6 @@
|
|||
}
|
||||
|
||||
[cell setChat:[data objectAtIndex:[indexPath row]]];
|
||||
if(editMode)
|
||||
[cell enterEditMode];
|
||||
else
|
||||
[cell exitEditMode];
|
||||
[cell update];
|
||||
|
||||
return cell;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
name:@"LinphoneTextReceived"
|
||||
object:nil];
|
||||
|
||||
[tableController exitEditMode];
|
||||
[[tableController tableView] setEditing:FALSE];
|
||||
[editButton setOff];
|
||||
[[tableController tableView] reloadData];
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
}
|
||||
|
||||
- (IBAction)onEditClick:(id)event {
|
||||
[tableController toggleEditMode];
|
||||
[[tableController tableView] setEditing:![[tableController tableView] isEditing] animated:TRUE];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* UIMuteButton.h
|
||||
/* ContactDetailsTableViewController.h
|
||||
*
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
* Copyright (C) 2012 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
|
||||
|
|
@ -15,14 +15,18 @@
|
|||
* 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>
|
||||
#import "UIToggleButton.h"
|
||||
|
||||
|
||||
@interface UIPauseResumeButton : UIToggleButton<UIToggleButtonDelegate> {
|
||||
#import <AddressBook/AddressBook.h>
|
||||
|
||||
@interface ContactDetailsTableViewController : UITableViewController {
|
||||
@private
|
||||
ABRecordRef contact;
|
||||
NSMutableArray *dataCache;
|
||||
ABAddressBookRef addressBook;
|
||||
}
|
||||
|
||||
@property (nonatomic, assign) ABRecordRef contact;
|
||||
|
||||
@end
|
||||
208
Classes/ContactDetailsTableViewController.m
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
/* ContactDetailsTableViewController.m
|
||||
*
|
||||
* Copyright (C) 2012 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 "ContactDetailsTableViewController.h"
|
||||
#import "UIContactDetailsHeader.h"
|
||||
#import "PhoneMainView.h"
|
||||
|
||||
@implementation ContactDetailsTableViewController
|
||||
|
||||
@synthesize contact;
|
||||
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (void)initContactDetailsTableViewController {
|
||||
addressBook = ABAddressBookCreate();
|
||||
dataCache = [[NSMutableArray alloc] init];
|
||||
}
|
||||
|
||||
- (id)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initContactDetailsTableViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
self = [super initWithCoder:decoder];
|
||||
if (self) {
|
||||
[self initContactDetailsTableViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[dataCache dealloc];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
ABAddressBookRegisterExternalChangeCallback (addressBook, sync_toc_address_book, self);
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
ABAddressBookUnregisterExternalChangeCallback(addressBook, sync_toc_address_book, self);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
||||
static void sync_toc_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
|
||||
ContactDetailsTableViewController* controller = (ContactDetailsTableViewController*)context;
|
||||
ABRecordID recordID = ABRecordGetRecordID([controller contact]);
|
||||
ABRecordRef newRecord = ABAddressBookGetPersonWithRecordID(addressBook, recordID);
|
||||
if(newRecord) {
|
||||
[controller setContact:newRecord];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadData {
|
||||
[dataCache removeAllObjects];
|
||||
|
||||
if(contact == NULL)
|
||||
return;
|
||||
|
||||
// Phone numbers
|
||||
{
|
||||
ABMultiValueRef lMap = ABRecordCopyValue(contact, kABPersonPhoneProperty);
|
||||
NSMutableArray *subArray = [[NSMutableArray alloc] init];
|
||||
for(int i = 0; i < ABMultiValueGetCount(lMap); ++i) {
|
||||
CFStringRef lValue = ABMultiValueCopyValueAtIndex(lMap, i);
|
||||
CFStringRef lLabel = ABMultiValueCopyLabelAtIndex(lMap, i);
|
||||
CFStringRef lLocalizedLabel = ABAddressBookCopyLocalizedLabel(lLabel);
|
||||
[subArray addObject:[NSArray arrayWithObjects:[NSString stringWithString:(NSString*)lValue], [NSString stringWithString:(NSString*)lLocalizedLabel], nil]];
|
||||
if(lLocalizedLabel)
|
||||
CFRelease(lLocalizedLabel);
|
||||
CFRelease(lLabel);
|
||||
CFRelease(lValue);
|
||||
}
|
||||
[dataCache addObject:subArray];
|
||||
CFRelease(lMap);
|
||||
}
|
||||
|
||||
// SIP (IM)
|
||||
{
|
||||
ABMultiValueRef lMap = ABRecordCopyValue(contact, kABPersonInstantMessageProperty);
|
||||
NSMutableArray *subArray = [[NSMutableArray alloc] init];
|
||||
for(int i = 0; i < ABMultiValueGetCount(lMap); ++i) {
|
||||
CFDictionaryRef lDict = ABMultiValueCopyValueAtIndex(lMap, i);
|
||||
if(CFDictionaryContainsKey(lDict, @"service")) {
|
||||
if(CFStringCompare((CFStringRef)@"SIP", CFDictionaryGetValue(lDict, @"service"), kCFCompareCaseInsensitive) == 0) {
|
||||
CFStringRef lValue = CFDictionaryGetValue(lDict, @"username");
|
||||
CFStringRef lLabel = ABMultiValueCopyLabelAtIndex(lMap, i);
|
||||
CFStringRef lLocalizedLabel = ABAddressBookCopyLocalizedLabel(lLabel);
|
||||
[subArray addObject:[NSArray arrayWithObjects:[NSString stringWithString:(NSString*)lValue], [NSString stringWithString:(NSString*)lLocalizedLabel], nil]];
|
||||
if(lLocalizedLabel)
|
||||
CFRelease(lLocalizedLabel);
|
||||
CFRelease(lLabel);
|
||||
|
||||
}
|
||||
}
|
||||
CFRelease(lDict);
|
||||
}
|
||||
[dataCache addObject:subArray];
|
||||
CFRelease(lMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Property Functions
|
||||
|
||||
- (void)setContact:(ABRecordRef)acontact {
|
||||
self->contact = acontact;
|
||||
[[self tableView] reloadData];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UITableViewDataSource Functions
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
[self loadData];
|
||||
return [dataCache count];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
NSMutableDictionary *dict = [dataCache objectAtIndex:section];
|
||||
return [dict count];
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ContactDetailsCell"];
|
||||
if (cell == nil) {
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:@"ContactDetailsCell"];
|
||||
//[cell setSelectedBackgroundView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"list_hightlight.png"]]];
|
||||
}
|
||||
NSMutableArray *sectionDict = [dataCache objectAtIndex:[indexPath section]];
|
||||
NSArray *tuple = [sectionDict objectAtIndex:[indexPath row]];
|
||||
[cell.textLabel setText:[tuple objectAtIndex:1]];
|
||||
[cell.detailTextLabel setText:[tuple objectAtIndex:0]];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
NSMutableArray *sectionDict = [dataCache objectAtIndex:[indexPath section]];
|
||||
NSArray *tuple = [sectionDict objectAtIndex:[indexPath row]];
|
||||
|
||||
NSString *dest = [tuple objectAtIndex:0];
|
||||
if(![dest hasPrefix:@"sip:"])
|
||||
dest = [NSString stringWithFormat:@"sip:%@", [tuple objectAtIndex:0]];
|
||||
CFStringRef lDisplayName = ABRecordCopyCompositeName(contact);
|
||||
NSString *displayName = [NSString stringWithString:(NSString*) lDisplayName];
|
||||
CFRelease(lDisplayName);
|
||||
|
||||
// Go to dialer view
|
||||
NSDictionary *dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
[[[NSArray alloc] initWithObjects: dest, displayName, nil] autorelease]
|
||||
, @"call:displayName:",
|
||||
nil] autorelease];
|
||||
[[PhoneMainView instance] changeView:PhoneView_Dialer dict:dict];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UITableViewDelegate Functions
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
if(section == 0) {
|
||||
UIContactDetailsHeader *headerController = [[UIContactDetailsHeader alloc] init];
|
||||
UIView *headerView = [headerController view];
|
||||
[headerController setContact:contact];
|
||||
[headerController update];
|
||||
[headerController release];
|
||||
return headerView;
|
||||
} else {
|
||||
return [[UIView alloc] initWithFrame:CGRectZero];
|
||||
}
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
||||
if(section == 0)
|
||||
return [UIContactDetailsHeader height];
|
||||
else {
|
||||
return 0.000001f; // Hack UITableView = 0
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
36
Classes/ContactDetailsViewController.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* ContactDetailsViewController.h
|
||||
*
|
||||
* Copyright (C) 2012 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>
|
||||
#import <AddressBook/AddressBook.h>
|
||||
|
||||
#import "UICompositeViewController.h"
|
||||
#import "ContactDetailsTableViewController.h"
|
||||
|
||||
@interface ContactDetailsViewController : UIViewController<UICompositeViewDelegate> {
|
||||
ContactDetailsTableViewController *tableController;
|
||||
ABRecordRef contact;
|
||||
}
|
||||
|
||||
@property (nonatomic, assign) ABRecordRef contact;
|
||||
@property (nonatomic, retain) IBOutlet ContactDetailsTableViewController *tableController;
|
||||
|
||||
- (IBAction)onBackClick:(id)event;
|
||||
|
||||
@end
|
||||
70
Classes/ContactDetailsViewController.m
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
/* ContactDetailsViewController.m
|
||||
*
|
||||
* Copyright (C) 2012 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 "ContactDetailsViewController.h"
|
||||
#import "PhoneMainView.h"
|
||||
|
||||
@implementation ContactDetailsViewController
|
||||
|
||||
@synthesize tableController;
|
||||
@synthesize contact;
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (id)init {
|
||||
return [super initWithNibName:@"ContactDetailsViewController" bundle:[NSBundle mainBundle]];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[tableController release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Property Functions
|
||||
|
||||
|
||||
- (void)setContact:(ABRecordRef)acontact {
|
||||
self->contact = acontact;
|
||||
[tableController setContact:contact];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UICompositeViewDelegate Functions
|
||||
|
||||
+ (UICompositeViewDescription*) compositeViewDescription {
|
||||
UICompositeViewDescription *description = [UICompositeViewDescription alloc];
|
||||
description->content = @"ContactDetailsViewController";
|
||||
description->tabBar = @"UIMainBar";
|
||||
description->tabBarEnabled = true;
|
||||
description->stateBar = nil;
|
||||
description->stateBarEnabled = false;
|
||||
description->fullscreen = false;
|
||||
return description;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Action Functions
|
||||
|
||||
- (IBAction)onBackClick:(id)event {
|
||||
[[PhoneMainView instance] popView];
|
||||
}
|
||||
|
||||
@end
|
||||
392
Classes/ContactDetailsViewController.xib
Normal file
|
|
@ -0,0 +1,392 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1296</int>
|
||||
<string key="IBDocument.SystemVersion">11E53</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.47</string>
|
||||
<string key="IBDocument.HIToolboxVersion">569.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">1181</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBUITableViewController</string>
|
||||
<string>IBUIButton</string>
|
||||
<string>IBUIImageView</string>
|
||||
<string>IBUIView</string>
|
||||
<string>IBUITableView</string>
|
||||
<string>IBProxyObject</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="975951072">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="191373211">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIImageView" id="967404912">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="624008635"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSCustomResource" key="IBUIImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">numpad_background.png</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIView" id="624008635">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">290</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIButton" id="40094652">
|
||||
<reference key="NSNextResponder" ref="624008635"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrameSize">{160, 58}</string>
|
||||
<reference key="NSSuperview" ref="624008635"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="100677920"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
<string key="IBUIAccessibilityLabel">Add contact</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<bool key="IBUIAdjustsImageWhenHighlighted">NO</bool>
|
||||
<object class="NSColor" key="IBUINormalTitleShadowColor" id="734764467">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC41AA</bytes>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUIHighlightedImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">contact_back_over.png</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUINormalImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">contact_back_default.png</string>
|
||||
</object>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription" id="1017377951">
|
||||
<int key="type">2</int>
|
||||
<double key="pointSize">15</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont" id="669509502">
|
||||
<string key="NSName">Helvetica-Bold</string>
|
||||
<double key="NSSize">15</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIButton" id="100677920">
|
||||
<reference key="NSNextResponder" ref="624008635"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{160, 0}, {160, 58}}</string>
|
||||
<reference key="NSSuperview" ref="624008635"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="685526080"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
<string key="IBUIAccessibilityLabel">Add contact</string>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<bool key="IBUIAdjustsImageWhenHighlighted">NO</bool>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="734764467"/>
|
||||
<object class="NSCustomResource" key="IBUIHighlightedImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">contact_edit_over.png</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUINormalImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">contact_edit_default.png</string>
|
||||
</object>
|
||||
<reference key="IBUIFontDescription" ref="1017377951"/>
|
||||
<reference key="IBUIFont" ref="669509502"/>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{320, 58}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="40094652"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace" id="651566535">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUITableView" id="685526080">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">306</int>
|
||||
<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">3</int>
|
||||
<bytes key="NSWhite">MCAwAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIAlwaysBounceVertical">YES</bool>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<int key="IBUISeparatorStyle">2</int>
|
||||
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
|
||||
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
|
||||
<float key="IBUIRowHeight">44</float>
|
||||
<float key="IBUISectionHeaderHeight">10</float>
|
||||
<float key="IBUISectionFooterHeight">10</float>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="967404912"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<reference key="NSCustomColorSpace" ref="651566535"/>
|
||||
</object>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUITableViewController" id="537601624">
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="IBUIInterfaceOrientation">1</int>
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="191373211"/>
|
||||
</object>
|
||||
<int key="connectionID">3</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">tableController</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="537601624"/>
|
||||
</object>
|
||||
<int key="connectionID">27</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">onBackClick:</string>
|
||||
<reference key="source" ref="40094652"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">10</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">dataSource</string>
|
||||
<reference key="source" ref="685526080"/>
|
||||
<reference key="destination" ref="537601624"/>
|
||||
</object>
|
||||
<int key="connectionID">28</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="685526080"/>
|
||||
<reference key="destination" ref="537601624"/>
|
||||
</object>
|
||||
<int key="connectionID">29</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="537601624"/>
|
||||
<reference key="destination" ref="685526080"/>
|
||||
</object>
|
||||
<int key="connectionID">26</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="191373211"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="967404912"/>
|
||||
<reference ref="624008635"/>
|
||||
<reference ref="685526080"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="624008635"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="100677920"/>
|
||||
<reference ref="40094652"/>
|
||||
</array>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
<string key="objectName">header</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">8</int>
|
||||
<reference key="object" ref="100677920"/>
|
||||
<reference key="parent" ref="624008635"/>
|
||||
<string key="objectName">editButton</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">9</int>
|
||||
<reference key="object" ref="40094652"/>
|
||||
<reference key="parent" ref="624008635"/>
|
||||
<string key="objectName">backButton</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">11</int>
|
||||
<reference key="object" ref="967404912"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
<string key="objectName">background</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">19</int>
|
||||
<reference key="object" ref="685526080"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
<string key="objectName">tableView</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">20</int>
|
||||
<reference key="object" ref="537601624"/>
|
||||
<array class="NSMutableArray" key="children"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">tableController</string>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">ContactDetailsViewController</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="19.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="20.CustomClassName">ContactDetailsTableViewController</string>
|
||||
<string key="20.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="0.0" key="8.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="0.0" key="9.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">29</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ContactDetailsTableViewController</string>
|
||||
<string key="superclassName">UITableViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ContactDetailsTableViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ContactDetailsViewController</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>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">onBackClick:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<string key="name">onBackClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">tableController</string>
|
||||
<string key="NS.object.0">ContactDetailsTableViewController</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">tableController</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">tableController</string>
|
||||
<string key="candidateClassName">ContactDetailsTableViewController</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ContactDetailsViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<real value="1296" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<string key="contact_back_default.png">{320, 117}</string>
|
||||
<string key="contact_back_over.png">{320, 117}</string>
|
||||
<string key="contact_edit_default.png">{320, 117}</string>
|
||||
<string key="contact_edit_over.png">{320, 117}</string>
|
||||
<string key="numpad_background.png">{640, 523}</string>
|
||||
</dictionary>
|
||||
<string key="IBCocoaTouchPluginVersion">1181</string>
|
||||
</data>
|
||||
</archive>
|
||||
|
|
@ -26,6 +26,9 @@
|
|||
OrderedDictionary* addressBookMap;
|
||||
|
||||
ABAddressBookRef addressBook;
|
||||
BOOL sipFilter;
|
||||
}
|
||||
|
||||
@property (nonatomic, assign) BOOL sipFilter;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -24,67 +24,129 @@
|
|||
|
||||
@implementation ContactsTableViewController
|
||||
|
||||
void sync_toc_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
|
||||
ContactsTableViewController* controller = (ContactsTableViewController*)context;
|
||||
OrderedDictionary* lAddressBookMap = controller->addressBookMap;
|
||||
@synchronized (lAddressBookMap) {
|
||||
|
||||
// Reset Address book
|
||||
|
||||
[lAddressBookMap removeAllObjects];
|
||||
|
||||
NSArray *lContacts = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
|
||||
for (id lPerson in lContacts) {
|
||||
CFStringRef lFirstName = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonFirstNameProperty);
|
||||
CFStringRef lLocalizedFirstName = (lFirstName != nil)? ABAddressBookCopyLocalizedLabel(lFirstName): nil;
|
||||
CFStringRef lLastName = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonLastNameProperty);
|
||||
CFStringRef lLocalizedLastName = (lLastName != nil)? ABAddressBookCopyLocalizedLabel(lLastName): nil;
|
||||
NSString *name = nil;
|
||||
if(lLocalizedFirstName != nil && lLocalizedLastName != nil) {
|
||||
name=[NSString stringWithFormat:@"%@%@", [(NSString *)lLocalizedFirstName retain], [(NSString *)lLocalizedLastName retain]];
|
||||
} else if(lLocalizedLastName != nil) {
|
||||
name=[NSString stringWithFormat:@"%@",[(NSString *)lLocalizedLastName retain]];
|
||||
} else if(lLocalizedFirstName != nil) {
|
||||
name=[NSString stringWithFormat:@"%@",[(NSString *)lLocalizedFirstName retain]];
|
||||
}
|
||||
if(name != nil) {
|
||||
// Put in correct subDic
|
||||
NSString *firstChar = [[name substringToIndex:1] uppercaseString];
|
||||
OrderedDictionary *subDic =[lAddressBookMap objectForKey: firstChar];
|
||||
if(subDic == nil) {
|
||||
subDic = [[OrderedDictionary alloc] init];
|
||||
[lAddressBookMap insertObject:subDic forKey:firstChar selector:@selector(caseInsensitiveCompare:)];
|
||||
}
|
||||
[subDic insertObject:lPerson forKey:name selector:@selector(caseInsensitiveCompare:)];
|
||||
}
|
||||
if(lLocalizedLastName != nil)
|
||||
CFRelease(lLocalizedLastName);
|
||||
if(lLastName != nil)
|
||||
CFRelease(lLastName);
|
||||
if(lLocalizedFirstName != nil)
|
||||
CFRelease(lLocalizedFirstName);
|
||||
if(lFirstName != nil)
|
||||
CFRelease(lFirstName);
|
||||
}
|
||||
CFRelease(lContacts);
|
||||
@synthesize sipFilter;
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (void)initContactsTableViewController {
|
||||
addressBookMap = [[OrderedDictionary alloc] init];
|
||||
addressBook = ABAddressBookCreate();
|
||||
}
|
||||
|
||||
- (id)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initContactsTableViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
self = [super initWithCoder:decoder];
|
||||
if (self) {
|
||||
[self initContactsTableViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
[addressBookMap removeAllObjects];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Property Functions
|
||||
|
||||
- (void)setSipFilter:(BOOL)asipFilter {
|
||||
self->sipFilter = asipFilter;
|
||||
[[self tableView] reloadData];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
||||
static void sync_toc_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
|
||||
ContactsTableViewController* controller = (ContactsTableViewController*)context;
|
||||
[(UITableView *)controller.view reloadData];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
||||
- (void) viewDidLoad {
|
||||
addressBookMap = [[OrderedDictionary alloc] init];
|
||||
addressBook = ABAddressBookCreate();
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
ABAddressBookRegisterExternalChangeCallback (addressBook, sync_toc_address_book, self);
|
||||
sync_toc_address_book(addressBook, nil, self);
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
ABAddressBookUnregisterExternalChangeCallback(addressBook, sync_toc_address_book, self);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UITableViewDataSource Functions
|
||||
|
||||
- (void)reloadData {
|
||||
@synchronized (addressBookMap) {
|
||||
|
||||
// Reset Address book
|
||||
[addressBookMap removeAllObjects];
|
||||
|
||||
NSArray *lContacts = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
|
||||
for (id lPerson in lContacts) {
|
||||
BOOL add = true;
|
||||
if(sipFilter) {
|
||||
add = false;
|
||||
ABMultiValueRef lMap = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonInstantMessageProperty);
|
||||
for(int i = 0; i < ABMultiValueGetCount(lMap); ++i) {
|
||||
CFDictionaryRef lDict = ABMultiValueCopyValueAtIndex(lMap, i);
|
||||
if(CFDictionaryContainsKey(lDict, @"service")) {
|
||||
if(CFStringCompare((CFStringRef)@"SIP", CFDictionaryGetValue(lDict, @"service"), kCFCompareCaseInsensitive) == 0) {
|
||||
add = true;
|
||||
}
|
||||
}
|
||||
CFRelease(lDict);
|
||||
}
|
||||
}
|
||||
if(add) {
|
||||
CFStringRef lFirstName = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonFirstNameProperty);
|
||||
CFStringRef lLocalizedFirstName = (lFirstName != nil)? ABAddressBookCopyLocalizedLabel(lFirstName): nil;
|
||||
CFStringRef lLastName = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonLastNameProperty);
|
||||
CFStringRef lLocalizedLastName = (lLastName != nil)? ABAddressBookCopyLocalizedLabel(lLastName): nil;
|
||||
NSString *name = nil;
|
||||
if(lLocalizedFirstName != nil && lLocalizedLastName != nil) {
|
||||
name=[NSString stringWithFormat:@"%@%@", [(NSString *)lLocalizedFirstName retain], [(NSString *)lLocalizedLastName retain]];
|
||||
} else if(lLocalizedLastName != nil) {
|
||||
name=[NSString stringWithFormat:@"%@",[(NSString *)lLocalizedLastName retain]];
|
||||
} else if(lLocalizedFirstName != nil) {
|
||||
name=[NSString stringWithFormat:@"%@",[(NSString *)lLocalizedFirstName retain]];
|
||||
}
|
||||
if(name != nil) {
|
||||
// Put in correct subDic
|
||||
NSString *firstChar = [[name substringToIndex:1] uppercaseString];
|
||||
OrderedDictionary *subDic =[addressBookMap objectForKey: firstChar];
|
||||
if(subDic == nil) {
|
||||
subDic = [[OrderedDictionary alloc] init];
|
||||
[addressBookMap insertObject:subDic forKey:firstChar selector:@selector(caseInsensitiveCompare:)];
|
||||
}
|
||||
[subDic insertObject:lPerson forKey:name selector:@selector(caseInsensitiveCompare:)];
|
||||
}
|
||||
if(lLocalizedLastName != nil)
|
||||
CFRelease(lLocalizedLastName);
|
||||
if(lLastName != nil)
|
||||
CFRelease(lLastName);
|
||||
if(lLocalizedFirstName != nil)
|
||||
CFRelease(lLocalizedFirstName);
|
||||
if(lFirstName != nil)
|
||||
CFRelease(lFirstName);
|
||||
}
|
||||
}
|
||||
CFRelease(lContacts);
|
||||
}
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
[self reloadData];
|
||||
return [addressBookMap count];
|
||||
}
|
||||
|
||||
|
|
@ -115,35 +177,13 @@ void sync_toc_address_book (ABAddressBookRef addressBook, CFDictionaryRef info,
|
|||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
OrderedDictionary *subDic = [addressBookMap objectForKey: [addressBookMap keyAtIndex: [indexPath section]]];
|
||||
ABRecordRef lPerson = [subDic objectForKey: [subDic keyAtIndex:[indexPath row]]];
|
||||
// TODO
|
||||
ABMultiValueRef lPhoneNumbers = ABRecordCopyValue((ABRecordRef)lPerson, kABPersonPhoneProperty);
|
||||
for(CFIndex i = 0; i < ABMultiValueGetCount(lPhoneNumbers); i++) {
|
||||
CFStringRef lLabel = ABMultiValueCopyLabelAtIndex(lPhoneNumbers, i);
|
||||
if ([(NSString*)lLabel isEqualToString:(NSString*)kABPersonPhoneMainLabel]) {
|
||||
CFStringRef lNumber = ABMultiValueCopyValueAtIndex(lPhoneNumbers,i);
|
||||
NSString *number = [(NSString *)lNumber retain];
|
||||
|
||||
// Go to dialer view
|
||||
NSDictionary *dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
[[[NSArray alloc] initWithObjects: number, nil] autorelease]
|
||||
, @"setAddress:",
|
||||
nil] autorelease];
|
||||
[[PhoneMainView instance] changeView:PhoneView_Dialer dict:dict];
|
||||
|
||||
CFRelease(lNumber);
|
||||
break;
|
||||
}
|
||||
CFRelease(lLabel);
|
||||
}
|
||||
CFRelease(lPhoneNumbers);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
[addressBookMap removeAllObjects];
|
||||
// Go to Contact details view
|
||||
NSDictionary *dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
[[[NSArray alloc] initWithObjects: lPerson, nil] autorelease]
|
||||
, @"setContact:",
|
||||
nil] autorelease];
|
||||
[[PhoneMainView instance] changeView:PhoneView_ContactDetails dict:dict push:TRUE];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ typedef enum _HistoryView {
|
|||
History_MAX
|
||||
} HistoryView;
|
||||
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (id)init {
|
||||
|
|
@ -70,7 +71,7 @@ typedef enum _HistoryView {
|
|||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
[self.tableView reloadData];
|
||||
[self changeView:History_All];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
|
|
@ -91,18 +92,22 @@ typedef enum _HistoryView {
|
|||
|
||||
- (void)changeView: (HistoryView) view {
|
||||
if(view == History_All) {
|
||||
|
||||
[tableController setSipFilter:FALSE];
|
||||
allButton.selected = TRUE;
|
||||
} else {
|
||||
allButton.selected = FALSE;
|
||||
}
|
||||
|
||||
if(view == History_Linphone) {
|
||||
[tableController setSipFilter:TRUE];
|
||||
linphoneButton.selected = TRUE;
|
||||
} else {
|
||||
linphoneButton.selected = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Action Functions
|
||||
|
||||
- (IBAction)onAllClick: (id) event {
|
||||
|
|
|
|||
|
|
@ -54,8 +54,10 @@
|
|||
BOOL transferMode;
|
||||
}
|
||||
|
||||
- (void)setAddress:(NSString*) address;
|
||||
- (void)setTransferMode:(NSNumber*) enable;
|
||||
- (void)setAddress:(NSString*)address;
|
||||
- (void)setTransferMode:(NSNumber*)enable;
|
||||
- (void)call:(NSString*)address displayName:(NSString *)displayName;
|
||||
- (void)call:(NSString*)address;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITextField* addressField;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* addContactButton;
|
||||
|
|
|
|||
|
|
@ -193,6 +193,13 @@
|
|||
[self callUpdate:call state:state];
|
||||
}
|
||||
|
||||
- (void)call:(NSString*)address {
|
||||
[self call:address displayName:nil];
|
||||
}
|
||||
|
||||
- (void)call:(NSString*)address displayName:(NSString *)displayName {
|
||||
[[LinphoneManager instance] call:address displayName:displayName transfer:transferMode];
|
||||
}
|
||||
|
||||
#pragma mark - UITextFieldDelegate Functions
|
||||
|
||||
|
|
|
|||
|
|
@ -21,11 +21,10 @@
|
|||
|
||||
@interface HistoryTableViewController : UITableViewController {
|
||||
@private
|
||||
BOOL editMode;
|
||||
BOOL missedFilter;
|
||||
NSMutableArray *callLogs;
|
||||
}
|
||||
|
||||
- (void) toggleEditMode;
|
||||
- (void) enterEditMode;
|
||||
- (void) exitEditMode;
|
||||
@property (nonatomic, assign) BOOL missedFilter;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -24,26 +24,70 @@
|
|||
|
||||
@implementation HistoryTableViewController
|
||||
|
||||
@synthesize missedFilter;
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (void)initHistoryTableViewController {
|
||||
callLogs = [[NSMutableArray alloc] init];
|
||||
missedFilter = false;
|
||||
}
|
||||
|
||||
- (id)init {
|
||||
if((self = [super init]) != nil) {
|
||||
self->editMode = false;
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initHistoryTableViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
self = [super initWithCoder:decoder];
|
||||
if (self) {
|
||||
[self initHistoryTableViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[callLogs release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Property Functions
|
||||
|
||||
- (void)setMissedFilter:(BOOL)amissedFilter {
|
||||
self->missedFilter = amissedFilter;
|
||||
[[self tableView] reloadData];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UITableViewDataSource Functions
|
||||
|
||||
- (void)loadData {
|
||||
[callLogs removeAllObjects];
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
while(logs != NULL) {
|
||||
LinphoneCallLog* log = (LinphoneCallLog *) logs->data;
|
||||
if(missedFilter) {
|
||||
if (log->status == LinphoneCallMissed) {
|
||||
[callLogs addObject:[NSValue valueWithPointer: log]];
|
||||
}
|
||||
} else {
|
||||
[callLogs addObject:[NSValue valueWithPointer: log]];
|
||||
}
|
||||
logs = ms_list_next(logs);
|
||||
}
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
return ms_list_size(logs);
|
||||
[self loadData];
|
||||
return [callLogs count];
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
|
@ -52,15 +96,8 @@
|
|||
cell = [[UIHistoryCell alloc] initWithIdentifier:@"UIHistoryCell"];
|
||||
}
|
||||
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
LinphoneCallLog* callLogs = ms_list_nth_data(logs, indexPath.row);
|
||||
|
||||
if(editMode)
|
||||
[cell enterEditMode];
|
||||
else
|
||||
[cell exitEditMode];
|
||||
|
||||
[cell setCallLog:callLogs];
|
||||
LinphoneCallLog *log = [[callLogs objectAtIndex:[indexPath row]] pointerValue];
|
||||
[cell setCallLog:log];
|
||||
[cell update];
|
||||
|
||||
return cell;
|
||||
|
|
@ -72,13 +109,12 @@
|
|||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
|
||||
const MSList * logs = linphone_core_get_call_logs([LinphoneManager getLc]);
|
||||
LinphoneCallLog* callLogs = ms_list_nth_data(logs, indexPath.row) ;
|
||||
LinphoneCallLog *log = [[callLogs objectAtIndex:[indexPath row]] pointerValue];
|
||||
LinphoneAddress* partyToCall;
|
||||
if (callLogs->dir == LinphoneCallIncoming) {
|
||||
partyToCall=callLogs->from;
|
||||
if (log->dir == LinphoneCallIncoming) {
|
||||
partyToCall=log->from;
|
||||
} else {
|
||||
partyToCall=callLogs->to;
|
||||
partyToCall=log->to;
|
||||
}
|
||||
const char* username = linphone_address_get_username(partyToCall)!=0?linphone_address_get_username(partyToCall):"";
|
||||
const char* displayName = linphone_address_get_display_name(partyToCall)!=0?linphone_address_get_display_name(partyToCall):"";
|
||||
|
|
@ -99,8 +135,8 @@
|
|||
|
||||
// Go to dialer view
|
||||
NSDictionary *dict = [[[NSDictionary alloc] initWithObjectsAndKeys:
|
||||
[[[NSArray alloc] initWithObjects: phoneNumber, nil] autorelease]
|
||||
, @"setAddress:",
|
||||
[[[NSArray alloc] initWithObjects: phoneNumber, dispName, nil] autorelease]
|
||||
, @"call:displayName:",
|
||||
nil] autorelease];
|
||||
[[PhoneMainView instance] changeView:PhoneView_Dialer dict:dict];
|
||||
|
||||
|
|
@ -108,25 +144,5 @@
|
|||
[dispName release];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (void) toggleEditMode {
|
||||
editMode = !editMode;
|
||||
[(UITableView*)[self view] reloadData];
|
||||
}
|
||||
|
||||
- (void) enterEditMode {
|
||||
if(!editMode) {
|
||||
[self toggleEditMode];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) exitEditMode {
|
||||
if(editMode) {
|
||||
[self toggleEditMode];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ typedef enum _HistoryView {
|
|||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
[tableController exitEditMode];
|
||||
[[tableController tableView] setEditing:FALSE];
|
||||
[self changeView: History_All];
|
||||
[editButton setOff];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
|
@ -98,12 +99,14 @@ typedef enum _HistoryView {
|
|||
- (void)changeView: (HistoryView) view {
|
||||
if(view == History_All) {
|
||||
allButton.selected = TRUE;
|
||||
[tableController setMissedFilter:FALSE];
|
||||
} else {
|
||||
allButton.selected = FALSE;
|
||||
}
|
||||
|
||||
if(view == History_Missed) {
|
||||
missedButton.selected = TRUE;
|
||||
[tableController setMissedFilter:TRUE];
|
||||
} else {
|
||||
missedButton.selected = FALSE;
|
||||
}
|
||||
|
|
@ -121,7 +124,7 @@ typedef enum _HistoryView {
|
|||
}
|
||||
|
||||
- (IBAction)onEditClick:(id) event {
|
||||
[tableController toggleEditMode];
|
||||
[[tableController tableView] setEditing:![[tableController tableView] isEditing] animated:TRUE];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ typedef struct _LinphoneCallAppData {
|
|||
@interface LinphoneManager : NSObject <AVAudioSessionDelegate> {
|
||||
@protected
|
||||
SCNetworkReachabilityRef proxyReachability;
|
||||
|
||||
@private
|
||||
NSTimer* mIterateTimer;
|
||||
id<LogView> mLogView;
|
||||
|
|
@ -82,6 +83,9 @@ typedef struct _LinphoneCallAppData {
|
|||
+ (NSString *)getPreferenceForCodec: (const char*) name withRate: (int) rate;
|
||||
+ (BOOL)codecIsSupported:(NSString *) prefName;
|
||||
|
||||
|
||||
- (void)call:(NSString *)address displayName:(NSString*)displayName transfer:(BOOL)transfer;
|
||||
|
||||
- (void)startLibLinphone;
|
||||
- (BOOL)isNotIphone3G;
|
||||
- (void)destroyLibLinphone;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#import <AVFoundation/AVAudioSession.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import <SystemConfiguration/SystemConfiguration.h>
|
||||
#import <CoreTelephony/CTCallCenter.h>
|
||||
|
||||
#import "LinphoneManager.h"
|
||||
#import "FastAddressBook.h"
|
||||
|
|
@ -363,6 +364,7 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
|
|||
[chat setRemoteContact:[NSString stringWithUTF8String:linphone_address_get_username(from)]];
|
||||
[chat setMessage:[NSString stringWithUTF8String:message]];
|
||||
[chat setDirection:[NSNumber numberWithInt:1]];
|
||||
[chat setTime:[NSDate date]];
|
||||
[chat create];
|
||||
|
||||
// Post event
|
||||
|
|
@ -820,4 +822,74 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
return NO;
|
||||
}
|
||||
|
||||
|
||||
- (void)call:(NSString *)address displayName:(NSString*)displayName transfer:(BOOL)transfer {
|
||||
if (!linphone_core_is_network_reachabled(theLinphoneCore)) {
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Network Error",nil)
|
||||
message:NSLocalizedString(@"There is no network connection available, enable WIFI or WWAN prior to place a call",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
return;
|
||||
}
|
||||
|
||||
CTCallCenter* ct = [[CTCallCenter alloc] init];
|
||||
if ([ct.currentCalls count] > 0) {
|
||||
ms_error("GSM call in progress, cancelling outgoing SIP call request");
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Cannot make call",nil)
|
||||
message:NSLocalizedString(@"Please terminate GSM call",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
[ct release];
|
||||
return;
|
||||
}
|
||||
[ct release];
|
||||
|
||||
LinphoneProxyConfig* proxyCfg;
|
||||
//get default proxy
|
||||
linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
|
||||
LinphoneCallParams* lcallParams = linphone_core_create_default_call_parameters([LinphoneManager getLc]);
|
||||
|
||||
if ([address length] == 0) return; //just return
|
||||
if ([address hasPrefix:@"sip:"]) {
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new([address cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
if(displayName!=nil) {
|
||||
linphone_address_set_display_name(linphoneAddress,[displayName cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
}
|
||||
if(transfer) {
|
||||
linphone_core_transfer_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), [address cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
} else {
|
||||
linphone_core_invite_address_with_params([LinphoneManager getLc], linphoneAddress, lcallParams);
|
||||
}
|
||||
linphone_address_destroy(linphoneAddress);
|
||||
} else if ( proxyCfg==nil){
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid sip address",nil)
|
||||
message:NSLocalizedString(@"Either configure a SIP proxy server from settings prior to place a call or use a valid sip address (I.E sip:john@example.net)",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
} else {
|
||||
char normalizedUserName[256];
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new(linphone_core_get_identity([LinphoneManager getLc]));
|
||||
linphone_proxy_config_normalize_number(proxyCfg,[address cStringUsingEncoding:[NSString defaultCStringEncoding]],normalizedUserName,sizeof(normalizedUserName));
|
||||
linphone_address_set_username(linphoneAddress, normalizedUserName);
|
||||
if(displayName!=nil) {
|
||||
linphone_address_set_display_name(linphoneAddress,[displayName cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
}
|
||||
if(transfer) {
|
||||
linphone_core_transfer_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), normalizedUserName);
|
||||
} else {
|
||||
linphone_core_invite_address_with_params([LinphoneManager getLc], linphoneAddress,lcallParams);
|
||||
}
|
||||
}
|
||||
linphone_call_params_destroy(lcallParams);
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -62,71 +62,11 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
||||
-(void) touchUp:(id) sender {
|
||||
if (!linphone_core_is_network_reachabled([LinphoneManager getLc])) {
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Network Error",nil)
|
||||
message:NSLocalizedString(@"There is no network connection available, enable WIFI or WWAN prior to place a call",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
return;
|
||||
}
|
||||
|
||||
CTCallCenter* ct = [[CTCallCenter alloc] init];
|
||||
if ([ct.currentCalls count] > 0) {
|
||||
ms_error("GSM call in progress, cancelling outgoing SIP call request");
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Cannot make call",nil)
|
||||
message:NSLocalizedString(@"Please terminate GSM call",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
[ct release];
|
||||
return;
|
||||
}
|
||||
[ct release];
|
||||
|
||||
if (TRUE /*!linphone_core_in_call([LinphoneManager getLc])*/) {
|
||||
LinphoneProxyConfig* proxyCfg;
|
||||
//get default proxy
|
||||
linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
|
||||
LinphoneCallParams* lcallParams = linphone_core_create_default_call_parameters([LinphoneManager getLc]);
|
||||
|
||||
if ([addressField.text length] == 0) return; //just return
|
||||
if ([addressField.text hasPrefix:@"sip:"]) {
|
||||
linphone_core_invite_with_params([LinphoneManager getLc],[addressField.text cStringUsingEncoding:[NSString defaultCStringEncoding]],lcallParams);
|
||||
} else if ( proxyCfg==nil){
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid sip address",nil)
|
||||
message:NSLocalizedString(@"Either configure a SIP proxy server from settings prior to place a call or use a valid sip address (I.E sip:john@example.net)",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
} else {
|
||||
char normalizedUserName[256];
|
||||
NSString* toUserName = [NSString stringWithString:[addressField text]];
|
||||
NSString* lDisplayName = [[LinphoneManager instance] getDisplayNameFromAddressBook:toUserName andUpdateCallLog:nil];
|
||||
|
||||
linphone_proxy_config_normalize_number(proxyCfg,[toUserName cStringUsingEncoding:[NSString defaultCStringEncoding]],normalizedUserName,sizeof(normalizedUserName));
|
||||
LinphoneAddress* tmpAddress = linphone_address_new(linphone_core_get_identity([LinphoneManager getLc]));
|
||||
linphone_address_set_username(tmpAddress,normalizedUserName);
|
||||
linphone_address_set_display_name(tmpAddress,(lDisplayName)?[lDisplayName cStringUsingEncoding:[NSString defaultCStringEncoding]]:nil);
|
||||
|
||||
|
||||
linphone_core_invite_address_with_params([LinphoneManager getLc],tmpAddress,lcallParams) ;
|
||||
|
||||
linphone_address_destroy(tmpAddress);
|
||||
}
|
||||
linphone_call_params_destroy(lcallParams);
|
||||
} else if (linphone_core_inc_invite_pending([LinphoneManager getLc])) {
|
||||
linphone_core_accept_call([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
|
||||
}
|
||||
- (void)touchUp:(id) sender {
|
||||
[[LinphoneManager instance] call:[addressField text] displayName:nil transfer:FALSE];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@
|
|||
|
||||
- (id)initWithIdentifier:(NSString*)identifier;
|
||||
- (void)update;
|
||||
- (void)enterEditMode;
|
||||
- (void)exitEditMode;
|
||||
|
||||
- (IBAction)onDetailsClick:(id)event;
|
||||
- (IBAction)onDeleteClick:(id)event;
|
||||
|
|
|
|||
|
|
@ -91,14 +91,25 @@
|
|||
[chatContentLabel setFrame: chatContentFrame];
|
||||
}
|
||||
|
||||
- (void)enterEditMode {
|
||||
[deleteButton setHidden:false];
|
||||
[detailsButton setHidden:true];
|
||||
- (void)setEditing:(BOOL)editing {
|
||||
[self setEditing:editing animated:FALSE];
|
||||
}
|
||||
|
||||
- (void)exitEditMode {
|
||||
[detailsButton setHidden:false];
|
||||
[deleteButton setHidden:true];
|
||||
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
|
||||
if(animated) {
|
||||
[UIView beginAnimations:nil context:nil];
|
||||
[UIView setAnimationDuration:0.3];
|
||||
}
|
||||
if(editing) {
|
||||
[deleteButton setAlpha:1.0f];
|
||||
[detailsButton setAlpha:0.0f];
|
||||
} else {
|
||||
[detailsButton setAlpha:1.0f];
|
||||
[deleteButton setAlpha:0.0f];
|
||||
}
|
||||
if(animated) {
|
||||
[UIView commitAnimations];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Action Functions
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@
|
|||
<string key="NSFrame">{{276, 0}, {44, 44}}</string>
|
||||
<reference key="NSSuperview" ref="316763236"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -162,7 +161,7 @@
|
|||
</object>
|
||||
<object class="IBUIButton" id="753878244">
|
||||
<reference key="NSNextResponder" ref="316763236"/>
|
||||
<int key="NSvFlags">-2147483356</int>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{276, 0}, {44, 44}}</string>
|
||||
<reference key="NSSuperview" ref="316763236"/>
|
||||
<reference key="NSWindow"/>
|
||||
|
|
@ -206,7 +205,6 @@
|
|||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -221,7 +219,6 @@
|
|||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<reference key="IBUIBackgroundColor" ref="867293857"/>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
|
|
@ -409,17 +406,20 @@
|
|||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIChatCell</string>
|
||||
<string key="superclassName">UITableViewCell</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">onDetailsClick:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">onDetailsClick:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="onDeleteClick:">id</string>
|
||||
<string key="onDetailsClick:">id</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||
<object class="IBActionInfo" key="onDeleteClick:">
|
||||
<string key="name">onDeleteClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="onDetailsClick:">
|
||||
<string key="name">onDetailsClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="avatarImage">UIImageView</string>
|
||||
<string key="chatContentLabel">UILabel</string>
|
||||
|
|
|
|||
|
|
@ -41,9 +41,6 @@
|
|||
|
||||
- (void)update;
|
||||
|
||||
- (void)enterEditMode;
|
||||
- (void)exitEditMode;
|
||||
|
||||
- (IBAction)onDeleteClick:(id)event;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -61,6 +61,40 @@ static UIFont *CELL_FONT = nil;
|
|||
#pragma mark -
|
||||
|
||||
- (void)update {
|
||||
if(chat != nil) {
|
||||
[messageLabel setText:[chat message]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setEditing:(BOOL)editing {
|
||||
[self setEditing:editing animated:FALSE];
|
||||
}
|
||||
|
||||
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
|
||||
if(animated) {
|
||||
[UIView beginAnimations:nil context:nil];
|
||||
[UIView setAnimationDuration:0.3];
|
||||
}
|
||||
if(editing) {
|
||||
[deleteButton setAlpha:1.0f];
|
||||
} else {
|
||||
[deleteButton setAlpha:0.0f];
|
||||
}
|
||||
if(animated) {
|
||||
[UIView commitAnimations];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)resizeContent {
|
||||
// Resize content
|
||||
{
|
||||
CGRect frame = [contentView frame];
|
||||
frame.origin.x = 0.0f;
|
||||
frame.origin.y = 0.0f;
|
||||
frame.size = [self frame].size;
|
||||
[ contentView setFrame:frame];
|
||||
}
|
||||
|
||||
if(chat != nil) {
|
||||
if([chat direction]) {
|
||||
[backgroundImage setImage:[TUNinePatchCache imageOfSize:[backgroundImage bounds].size
|
||||
|
|
@ -69,11 +103,14 @@ static UIFont *CELL_FONT = nil;
|
|||
[backgroundImage setImage:[TUNinePatchCache imageOfSize:[backgroundImage bounds].size
|
||||
forNinePatchNamed:@"chat_bubble_outgoing"]];
|
||||
}
|
||||
[messageLabel setText:[chat message]];
|
||||
}
|
||||
CGRect frame = [messageLabel frame];
|
||||
frame.size.height = [UIChatRoomCell messageHeight:[chat message]];
|
||||
[messageLabel setFrame:frame];
|
||||
|
||||
// Resize message
|
||||
{
|
||||
CGRect frame = [messageLabel frame];
|
||||
frame.size.height = [UIChatRoomCell messageHeight:[chat message]];
|
||||
[messageLabel setFrame:frame];
|
||||
}
|
||||
}
|
||||
|
||||
+ (CGFloat)messageHeight:(NSString*)message {
|
||||
|
|
@ -94,21 +131,12 @@ static UIFont *CELL_FONT = nil;
|
|||
return height;
|
||||
}
|
||||
|
||||
- (void)enterEditMode {
|
||||
[deleteButton setHidden:false];
|
||||
}
|
||||
|
||||
- (void)exitEditMode {
|
||||
[deleteButton setHidden:true];
|
||||
}
|
||||
|
||||
#pragma mark - View Functions
|
||||
|
||||
- (void)layoutSubviews {
|
||||
// Resize content
|
||||
CGRect frame = [contentView frame];
|
||||
frame.size = [self frame].size;
|
||||
[contentView setFrame:frame];
|
||||
[super layoutSubviews];
|
||||
[self resizeContent];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@
|
|||
</object>
|
||||
<object class="IBUIButton" id="859609488">
|
||||
<reference key="NSNextResponder" ref="456806949"/>
|
||||
<int key="NSvFlags">-2147483351</int>
|
||||
<int key="NSvFlags">297</int>
|
||||
<string key="NSFrame">{{236, 28}, {44, 44}}</string>
|
||||
<reference key="NSSuperview" ref="456806949"/>
|
||||
<reference key="NSWindow"/>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<object class="IBUIImageView" id="452773126">
|
||||
<reference key="NSNextResponder" ref="1033790597"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{-13, -1}, {131, 107}}</string>
|
||||
<string key="NSFrame">{{-13, -5}, {131, 107}}</string>
|
||||
<reference key="NSSuperview" ref="1033790597"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="906825234"/>
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
<object class="IBUIImageView" id="906825234">
|
||||
<reference key="NSNextResponder" ref="1033790597"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{20, 10}, {65, 65}}</string>
|
||||
<string key="NSFrame">{{20, 6}, {65, 65}}</string>
|
||||
<reference key="NSSuperview" ref="1033790597"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="683404399"/>
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
<object class="IBUILabel" id="683404399">
|
||||
<reference key="NSNextResponder" ref="1033790597"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{101, 31}, {199, 43}}</string>
|
||||
<string key="NSFrame">{{101, 27}, {199, 43}}</string>
|
||||
<reference key="NSSuperview" ref="1033790597"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
|
|
@ -159,8 +159,8 @@
|
|||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="1033790597"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="906825234"/>
|
||||
<reference ref="452773126"/>
|
||||
<reference ref="906825234"/>
|
||||
<reference ref="683404399"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSCustomResource" key="IBUIImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">champ-titre-conference.png</string>
|
||||
<string key="NSResourceName">header_conference.png</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIImageView" id="242054672">
|
||||
|
|
@ -57,6 +57,7 @@
|
|||
<string key="NSFrame">{{224, 14}, {25, 25}}</string>
|
||||
<reference key="NSSuperview" ref="232140160"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
@ -267,7 +268,7 @@
|
|||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<string key="champ-titre-conference.png">{640, 135}</string>
|
||||
<string key="header_conference.png">{640, 135}</string>
|
||||
<string key="pause-champ-numero-actif.png">{43, 50}</string>
|
||||
<string key="play-champ-numero-actif.png">{43, 46}</string>
|
||||
<string key="play-champ-numero-over.png">{43, 46}</string>
|
||||
|
|
|
|||
|
|
@ -23,10 +23,12 @@
|
|||
@interface UIContactCell : UITableViewCell {
|
||||
UILabel *firstNameLabel;
|
||||
UILabel *lastNameLabel;
|
||||
UIImageView *avatarImage;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel* firstNameLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* lastNameLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *avatarImage;
|
||||
|
||||
- (void)update:(ABRecordRef) record;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
@synthesize firstNameLabel;
|
||||
@synthesize lastNameLabel;
|
||||
@synthesize avatarImage;
|
||||
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
- (void) dealloc {
|
||||
[firstNameLabel release];
|
||||
[lastNameLabel release];
|
||||
[avatarImage release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
|
@ -65,12 +67,12 @@
|
|||
CFStringRef lLocalizedLastName = (lFirstName != nil)?ABAddressBookCopyLocalizedLabel(lLastName):nil;
|
||||
|
||||
if(lLocalizedFirstName != nil)
|
||||
[firstNameLabel setText: [(NSString *)lLocalizedFirstName retain]];
|
||||
[firstNameLabel setText: (NSString *)lLocalizedFirstName];
|
||||
else
|
||||
[firstNameLabel setText: @""];
|
||||
|
||||
if(lLocalizedLastName != nil)
|
||||
[lastNameLabel setText: [(NSString *)lLocalizedLastName retain]];
|
||||
[lastNameLabel setText: (NSString *)lLocalizedLastName];
|
||||
else
|
||||
[lastNameLabel setText: @""];
|
||||
|
||||
|
|
@ -83,6 +85,17 @@
|
|||
if(lFirstName != nil)
|
||||
CFRelease(lFirstName);
|
||||
|
||||
NSData *imgData = (NSData *)ABPersonCopyImageDataWithFormat(record, kABPersonImageFormatThumbnail);
|
||||
if(imgData != NULL) {
|
||||
UIImage *img = [[UIImage alloc] initWithData:imgData];
|
||||
[avatarImage setImage:img];
|
||||
[img release];
|
||||
} else {
|
||||
[avatarImage setImage:[UIImage imageNamed:@"avatar_unknown_small.png"]];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Adapt size
|
||||
//
|
||||
|
|
|
|||
|
|
@ -36,10 +36,21 @@
|
|||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIImageView" id="275930832">
|
||||
<reference key="NSNextResponder" ref="675878782"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{6, 6}, {32, 32}}</string>
|
||||
<reference key="NSSuperview" ref="675878782"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="505648338"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUILabel" id="505648338">
|
||||
<reference key="NSNextResponder" ref="675878782"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{10, 0}, {55, 44}}</string>
|
||||
<string key="NSFrame">{{46, 0}, {55, 44}}</string>
|
||||
<reference key="NSSuperview" ref="675878782"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="261477247"/>
|
||||
|
|
@ -75,7 +86,7 @@
|
|||
<object class="IBUILabel" id="261477247">
|
||||
<reference key="NSNextResponder" ref="675878782"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{75, 0}, {200, 44}}</string>
|
||||
<string key="NSFrame">{{111, 0}, {200, 44}}</string>
|
||||
<reference key="NSSuperview" ref="675878782"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:328</string>
|
||||
|
|
@ -108,6 +119,7 @@
|
|||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="275930832"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor" id="318755954">
|
||||
<int key="NSColorSpace">3</int>
|
||||
|
|
@ -175,6 +187,14 @@
|
|||
</object>
|
||||
<int key="connectionID">22</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">avatarImage</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="275930832"/>
|
||||
</object>
|
||||
<int key="connectionID">24</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
|
|
@ -199,8 +219,9 @@
|
|||
<int key="objectID">16</int>
|
||||
<reference key="object" ref="675878782"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="261477247"/>
|
||||
<reference ref="275930832"/>
|
||||
<reference ref="505648338"/>
|
||||
<reference ref="261477247"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
|
|
@ -228,6 +249,12 @@
|
|||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">background</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">23</int>
|
||||
<reference key="object" ref="275930832"/>
|
||||
<reference key="parent" ref="675878782"/>
|
||||
<string key="objectName">avatarImage</string>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
|
|
@ -239,13 +266,14 @@
|
|||
<string key="16.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="19.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">22</int>
|
||||
<int key="maxID">24</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
|
@ -253,10 +281,15 @@
|
|||
<string key="className">UIContactCell</string>
|
||||
<string key="superclassName">UITableViewCell</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="avatarImage">UIImageView</string>
|
||||
<string key="firstNameLabel">UILabel</string>
|
||||
<string key="lastNameLabel">UILabel</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="avatarImage">
|
||||
<string key="name">avatarImage</string>
|
||||
<string key="candidateClassName">UIImageView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="firstNameLabel">
|
||||
<string key="name">firstNameLabel</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
|
|
|
|||
39
Classes/LinphoneUI/UIContactDetailsHeader.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/* UIContactDetailsHeader.h
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <AddressBook/AddressBook.h>
|
||||
|
||||
@interface UIContactDetailsHeader : UIViewController {
|
||||
UILabel *contactLabel;
|
||||
UIImageView *avatarImage;
|
||||
|
||||
ABRecordRef contact;
|
||||
}
|
||||
|
||||
@property (assign) ABRecordRef contact;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel *contactLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *avatarImage;
|
||||
|
||||
+ (CGFloat)height;
|
||||
|
||||
- (void)update;
|
||||
|
||||
@end
|
||||
81
Classes/LinphoneUI/UIContactDetailsHeader.m
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
/* UIContactDetailsHeader.m
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "UIContactDetailsHeader.h"
|
||||
|
||||
@implementation UIContactDetailsHeader
|
||||
|
||||
@synthesize avatarImage;
|
||||
@synthesize contactLabel;
|
||||
@synthesize contact;
|
||||
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (id)init {
|
||||
return [super initWithNibName:@"UIContactDetailsHeader" bundle:[NSBundle mainBundle]];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[avatarImage release];
|
||||
[contactLabel release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (void)update {
|
||||
if(contact) {
|
||||
// Avatar image
|
||||
{
|
||||
NSData *imgData = (NSData *)ABPersonCopyImageDataWithFormat(contact, kABPersonImageFormatThumbnail);
|
||||
if(imgData != NULL) {
|
||||
UIImage *img = [[UIImage alloc] initWithData:imgData];
|
||||
[avatarImage setImage:img];
|
||||
[img release];
|
||||
} else {
|
||||
[avatarImage setImage:[UIImage imageNamed:@"avatar_unknown_small.png"]];
|
||||
}
|
||||
}
|
||||
|
||||
// Contact label
|
||||
{
|
||||
CFStringRef lFirstName = ABRecordCopyValue(contact, kABPersonFirstNameProperty);
|
||||
CFStringRef lLocalizedFirstName = (lFirstName != nil)?ABAddressBookCopyLocalizedLabel(lFirstName):nil;
|
||||
CFStringRef lLastName = ABRecordCopyValue(contact, kABPersonLastNameProperty);
|
||||
CFStringRef lLocalizedLastName = (lFirstName != nil)?ABAddressBookCopyLocalizedLabel(lLastName):nil;
|
||||
[contactLabel setText:[NSString stringWithFormat:@"%@ %@", (NSString*)lLocalizedFirstName, (NSString*)lLocalizedLastName]];
|
||||
if(lLocalizedLastName != nil)
|
||||
CFRelease(lLocalizedLastName);
|
||||
if(lLastName != nil)
|
||||
CFRelease(lLastName);
|
||||
if(lLocalizedFirstName != nil)
|
||||
CFRelease(lLocalizedFirstName);
|
||||
if(lFirstName != nil)
|
||||
CFRelease(lFirstName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+ (CGFloat)height {
|
||||
return 80.0f;
|
||||
}
|
||||
|
||||
@end
|
||||
244
Classes/LinphoneUI/UIContactDetailsHeader.xib
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1296</int>
|
||||
<string key="IBDocument.SystemVersion">11E53</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.47</string>
|
||||
<string key="IBDocument.HIToolboxVersion">569.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">1181</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBUIImageView</string>
|
||||
<string>IBUIView</string>
|
||||
<string>IBUILabel</string>
|
||||
<string>IBProxyObject</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="975951072">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="1033790597">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIImageView" id="452773126">
|
||||
<reference key="NSNextResponder" ref="1033790597"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{-13, -5}, {131, 107}}</string>
|
||||
<reference key="NSSuperview" ref="1033790597"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="906825234"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSCustomResource" key="IBUIImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">avatar_shadow_small.png</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIImageView" id="906825234">
|
||||
<reference key="NSNextResponder" ref="1033790597"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{20, 6}, {65, 65}}</string>
|
||||
<reference key="NSSuperview" ref="1033790597"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="683404399"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSCustomResource" key="IBUIImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">avatar_unknown_small.png</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUILabel" id="683404399">
|
||||
<reference key="NSNextResponder" ref="1033790597"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{101, 27}, {199, 43}}</string>
|
||||
<reference key="NSSuperview" ref="1033790597"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<int key="IBUIContentMode">7</int>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIText">Contact1</string>
|
||||
<object class="NSColor" key="IBUITextColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC4zMzMzMzMzMzMzAA</bytes>
|
||||
</object>
|
||||
<nil key="IBUIHighlightedColor"/>
|
||||
<int key="IBUIBaselineAdjustment">0</int>
|
||||
<float key="IBUIMinimumFontSize">10</float>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">1</int>
|
||||
<double key="pointSize">22</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">22</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{320, 80}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="452773126"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MCAwAA</bytes>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="1033790597"/>
|
||||
</object>
|
||||
<int key="connectionID">5</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">avatarImage</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="906825234"/>
|
||||
</object>
|
||||
<int key="connectionID">9</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">contactLabel</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="683404399"/>
|
||||
</object>
|
||||
<int key="connectionID">11</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="1033790597"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="452773126"/>
|
||||
<reference ref="906825234"/>
|
||||
<reference ref="683404399"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="906825234"/>
|
||||
<reference key="parent" ref="1033790597"/>
|
||||
<string key="objectName">avatarImage</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="452773126"/>
|
||||
<reference key="parent" ref="1033790597"/>
|
||||
<string key="objectName">avatarShadowBackground</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">8</int>
|
||||
<reference key="object" ref="683404399"/>
|
||||
<reference key="parent" ref="1033790597"/>
|
||||
<string key="objectName">contactLabel</string>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">UIContactDetailsHeader</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">11</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIContactDetailsHeader</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="avatarImage">UIImageView</string>
|
||||
<string key="contactLabel">UILabel</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="avatarImage">
|
||||
<string key="name">avatarImage</string>
|
||||
<string key="candidateClassName">UIImageView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="contactLabel">
|
||||
<string key="name">contactLabel</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIContactDetailsHeader.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<real value="1296" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<string key="avatar_shadow_small.png">{262, 214}</string>
|
||||
<string key="avatar_unknown_small.png">{131, 131}</string>
|
||||
</dictionary>
|
||||
<string key="IBCocoaTouchPluginVersion">1181</string>
|
||||
</data>
|
||||
</archive>
|
||||
|
|
@ -43,7 +43,5 @@
|
|||
- (IBAction)onDelete:(id) event;
|
||||
|
||||
- (void)update;
|
||||
- (void)enterEditMode;
|
||||
- (void)exitEditMode;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -93,25 +93,35 @@
|
|||
partyToDisplay = callLog->to;
|
||||
}
|
||||
|
||||
const char* username = linphone_address_get_username(partyToDisplay)!=0?linphone_address_get_username(partyToDisplay):"";
|
||||
//const char* displayName = linphone_address_get_display_name(partyToDisplay);
|
||||
|
||||
const char* username = (linphone_address_get_display_name(partyToDisplay) != 0)? linphone_address_get_display_name(partyToDisplay):linphone_address_get_username(partyToDisplay);
|
||||
|
||||
[displayNameLabel setText:[NSString stringWithUTF8String: username]];
|
||||
[imageView setImage: image];
|
||||
}
|
||||
|
||||
- (void)enterEditMode {
|
||||
[deleteButton setHidden:false];
|
||||
[detailsButton setHidden:true];
|
||||
- (void)setEditing:(BOOL)editing {
|
||||
[self setEditing:editing animated:FALSE];
|
||||
}
|
||||
|
||||
- (void)exitEditMode {
|
||||
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
|
||||
if(animated) {
|
||||
[UIView beginAnimations:nil context:nil];
|
||||
[UIView setAnimationDuration:0.3];
|
||||
}
|
||||
if(editing) {
|
||||
[deleteButton setAlpha:1.0f];
|
||||
[detailsButton setAlpha:0.0f];
|
||||
} else {
|
||||
#ifdef DETAILS_DISABLED
|
||||
[detailsButton setHidden:true];
|
||||
[detailsButton setAlpha:0.0f];
|
||||
#else
|
||||
[detailsButton setHidden:false];
|
||||
[detailsButtonsetAlpha:1.0f];
|
||||
#endif
|
||||
[deleteButton setHidden:true];
|
||||
[deleteButton setAlpha:0.0f];
|
||||
}
|
||||
if(animated) {
|
||||
[UIView commitAnimations];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@
|
|||
</object>
|
||||
<object class="IBUIButton" id="192050775">
|
||||
<reference key="NSNextResponder" ref="702431052"/>
|
||||
<int key="NSvFlags">-2147483356</int>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{276, 0}, {44, 44}}</string>
|
||||
<reference key="NSSuperview" ref="702431052"/>
|
||||
<reference key="NSWindow"/>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
} else {
|
||||
historyButton.selected = FALSE;
|
||||
}
|
||||
if(view == PhoneView_Contacts) {
|
||||
if(view == PhoneView_Contacts || view == PhoneView_ContactDetails) {
|
||||
contactsButton.selected = TRUE;
|
||||
} else {
|
||||
contactsButton.selected = FALSE;
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
} else {
|
||||
settingsButton.selected = FALSE;
|
||||
}
|
||||
if(view == PhoneView_Chat) {
|
||||
if(view == PhoneView_Chat || view == PhoneView_ChatRoom) {
|
||||
chatButton.selected = TRUE;
|
||||
} else {
|
||||
chatButton.selected = FALSE;
|
||||
|
|
|
|||
|
|
@ -1,69 +0,0 @@
|
|||
/* UIMuteButton.m
|
||||
*
|
||||
* 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 "UIPauseResumeButton.h"
|
||||
#include "LinphoneManager.h"
|
||||
|
||||
|
||||
@implementation UIPauseResumeButton
|
||||
|
||||
|
||||
|
||||
-(void) onOn {
|
||||
LinphoneCall* c = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
if (c) {
|
||||
linphone_core_pause_call([LinphoneManager getLc], c);
|
||||
}
|
||||
}
|
||||
-(void) onOff {
|
||||
const MSList* c = linphone_core_get_calls([LinphoneManager getLc]);
|
||||
if (c) {
|
||||
linphone_core_resume_call([LinphoneManager getLc], (LinphoneCall*) c->data);
|
||||
}
|
||||
}
|
||||
-(bool) isInitialStateOn {
|
||||
@try {
|
||||
LinphoneCall* c = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
|
||||
if (c) {
|
||||
return linphone_call_get_state(c) == LinphoneCallPaused;
|
||||
} else {
|
||||
/* if current call is paused -> c == null */
|
||||
return true;
|
||||
}
|
||||
} @catch(NSException* e) {
|
||||
//not ready yet
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code.
|
||||
}
|
||||
*/
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
@ -61,71 +61,11 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
||||
-(void) touchUp:(id) sender {
|
||||
if (!linphone_core_is_network_reachabled([LinphoneManager getLc])) {
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Network Error",nil)
|
||||
message:NSLocalizedString(@"There is no network connection available, enable WIFI or WWAN prior to place a call",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
return;
|
||||
}
|
||||
|
||||
CTCallCenter* ct = [[CTCallCenter alloc] init];
|
||||
if ([ct.currentCalls count] > 0) {
|
||||
ms_error("GSM call in progress, cancelling outgoing SIP call request");
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Cannot make call",nil)
|
||||
message:NSLocalizedString(@"Please terminate GSM call",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
[ct release];
|
||||
return;
|
||||
}
|
||||
[ct release];
|
||||
|
||||
if (TRUE /*!linphone_core_in_call([LinphoneManager getLc])*/) {
|
||||
LinphoneProxyConfig* proxyCfg;
|
||||
//get default proxy
|
||||
linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
|
||||
LinphoneCallParams* lcallParams = linphone_core_create_default_call_parameters([LinphoneManager getLc]);
|
||||
|
||||
if ([addressField.text length] == 0) return; //just return
|
||||
if ([addressField.text hasPrefix:@"sip:"]) {
|
||||
linphone_core_transfer_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), [addressField.text cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
} else if ( proxyCfg==nil){
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid sip address",nil)
|
||||
message:NSLocalizedString(@"Either configure a SIP proxy server from settings prior to place a call or use a valid sip address (I.E sip:john@example.net)",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
} else {
|
||||
char normalizedUserName[256];
|
||||
NSString* toUserName = [NSString stringWithString:[addressField text]];
|
||||
NSString* lDisplayName = [[LinphoneManager instance] getDisplayNameFromAddressBook:toUserName andUpdateCallLog:nil];
|
||||
|
||||
linphone_proxy_config_normalize_number(proxyCfg,[toUserName cStringUsingEncoding:[NSString defaultCStringEncoding]],normalizedUserName,sizeof(normalizedUserName));
|
||||
LinphoneAddress* tmpAddress = linphone_address_new(linphone_core_get_identity([LinphoneManager getLc]));
|
||||
linphone_address_set_username(tmpAddress,normalizedUserName);
|
||||
linphone_address_set_display_name(tmpAddress,(lDisplayName)?[lDisplayName cStringUsingEncoding:[NSString defaultCStringEncoding]]:nil);
|
||||
|
||||
|
||||
linphone_core_transfer_call([LinphoneManager getLc], linphone_core_get_current_call([LinphoneManager getLc]), normalizedUserName);
|
||||
|
||||
linphone_address_destroy(tmpAddress);
|
||||
}
|
||||
linphone_call_params_destroy(lcallParams);
|
||||
} else if (linphone_core_inc_invite_pending([LinphoneManager getLc])) {
|
||||
linphone_core_accept_call([LinphoneManager getLc],linphone_core_get_current_call([LinphoneManager getLc]));
|
||||
}
|
||||
- (void)touchUp:(id) sender {
|
||||
[[LinphoneManager instance] call:[addressField text] displayName:nil transfer:TRUE];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@
|
|||
return [[[NSArray alloc] init] autorelease];
|
||||
}
|
||||
|
||||
const char *sql = [[NSString stringWithFormat:@"SELECT id, localContact, remoteContact, direction, message, time FROM chat WHERE remoteContact=\"%@\" ORDER BY time ASC",
|
||||
const char *sql = [[NSString stringWithFormat:@"SELECT id, localContact, remoteContact, direction, message, time FROM chat WHERE remoteContact=\"%@\" ORDER BY time DESC",
|
||||
contact] UTF8String];
|
||||
sqlite3_stmt *sqlStatement;
|
||||
if (sqlite3_prepare(database, sql, -1, &sqlStatement, NULL) != SQLITE_OK) {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ typedef enum _PhoneView {
|
|||
PhoneView_Chat,
|
||||
PhoneView_ChatRoom,
|
||||
PhoneView_Contacts,
|
||||
PhoneView_ContactDetails,
|
||||
PhoneView_InCall,
|
||||
PhoneView_IncomingCall,
|
||||
PhoneView_END
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#import "SettingsViewController.h"
|
||||
#import "FirstLoginViewController.h"
|
||||
#import "WizardViewController.h"
|
||||
#import "ContactDetailsViewController.h"
|
||||
|
||||
#import "AbstractCall.h"
|
||||
|
||||
|
|
@ -118,6 +119,7 @@ static PhoneMainView* phoneMainViewInstance=nil;
|
|||
[viewDescriptions setObject:[SettingsViewController compositeViewDescription] forKey:[NSNumber numberWithInt: PhoneView_Settings]];
|
||||
[viewDescriptions setObject:[FirstLoginViewController compositeViewDescription] forKey:[NSNumber numberWithInt: PhoneView_FirstLogin]];
|
||||
[viewDescriptions setObject:[WizardViewController compositeViewDescription] forKey:[NSNumber numberWithInt: PhoneView_Wizard]];
|
||||
[viewDescriptions setObject:[ContactDetailsViewController compositeViewDescription] forKey:[NSNumber numberWithInt:PhoneView_ContactDetails]];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@
|
|||
|
||||
@synthesize addressBook;
|
||||
|
||||
-(Contact*) getMatchingRecord:(NSString*) number {
|
||||
- (Contact*)getMatchingRecord:(NSString*) number {
|
||||
@synchronized (mAddressBookMap){
|
||||
return (Contact*) [mAddressBookMap objectForKey:number];
|
||||
}
|
||||
}
|
||||
|
||||
+(NSString*) appendCountryCodeIfPossible:(NSString*) number {
|
||||
+ (NSString*)appendCountryCodeIfPossible:(NSString*) number {
|
||||
if (![number hasPrefix:@"+"] && ![number hasPrefix:@"00"]) {
|
||||
NSString* lCountryCode = [[LinphoneManager instance].settingsStore objectForKey:@"countrycode_preference"];
|
||||
if (lCountryCode && [lCountryCode length]>0) {
|
||||
|
|
@ -40,7 +40,8 @@
|
|||
}
|
||||
return number;
|
||||
}
|
||||
+(NSString*) normalizePhoneNumber:(NSString*) number {
|
||||
|
||||
+ (NSString*)normalizePhoneNumber:(NSString*) number {
|
||||
NSString* lNormalizedNumber = [(NSString*)number stringByReplacingOccurrencesOfString:@" " withString:@""];
|
||||
lNormalizedNumber = [lNormalizedNumber stringByReplacingOccurrencesOfString:@"(" withString:@""];
|
||||
lNormalizedNumber = [lNormalizedNumber stringByReplacingOccurrencesOfString:@")" withString:@""];
|
||||
|
|
@ -48,6 +49,7 @@
|
|||
lNormalizedNumber = [FastAddressBook appendCountryCodeIfPossible:lNormalizedNumber];
|
||||
return lNormalizedNumber;
|
||||
}
|
||||
|
||||
void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
|
||||
NSMutableDictionary* lAddressBookMap = (NSMutableDictionary*)context;
|
||||
@synchronized (lAddressBookMap) {
|
||||
|
|
@ -73,31 +75,40 @@ void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void
|
|||
CFRelease(lContacts);
|
||||
}
|
||||
}
|
||||
-(FastAddressBook*) init {
|
||||
|
||||
- (FastAddressBook*)init {
|
||||
if ((self = [super init])) {
|
||||
mAddressBookMap = [[NSMutableDictionary alloc] init];
|
||||
addressBook = ABAddressBookCreate();
|
||||
ABAddressBookRegisterExternalChangeCallback (addressBook,sync_address_book,mAddressBookMap);
|
||||
ABAddressBookRegisterExternalChangeCallback (addressBook, sync_address_book, mAddressBookMap);
|
||||
sync_address_book(addressBook,nil,mAddressBookMap);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
ABAddressBookUnregisterExternalChangeCallback(addressBook, sync_address_book, mAddressBookMap);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
@implementation Contact
|
||||
@synthesize record;
|
||||
@synthesize numberType;
|
||||
|
||||
-(id) initWithRecord:(ABRecordRef) aRecord ofType:(NSString*) type {
|
||||
- (id)initWithRecord:(ABRecordRef) aRecord ofType:(NSString*) type {
|
||||
if ((self = [super init])) {
|
||||
record=CFRetain(aRecord);
|
||||
numberType= [type?type:@"unknown" retain];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
CFRelease(record);
|
||||
[numberType release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
BIN
Resources/contact_back_default.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
Resources/contact_back_over.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
Resources/contact_edit_default.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
Resources/contact_edit_over.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
Resources/contact_number.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
Resources/contact_number_over.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
|
@ -153,6 +153,18 @@
|
|||
7066FC0C13E830E400EFC6DC /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7066FC0B13E830E400EFC6DC /* libvpx.a */; };
|
||||
70E542F313E147E3002BA2C0 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70E542F213E147E3002BA2C0 /* OpenGLES.framework */; };
|
||||
70E542F513E147EB002BA2C0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70E542F413E147EB002BA2C0 /* QuartzCore.framework */; };
|
||||
D3128FE115AABC7E00A2147A /* ContactDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3128FDF15AABC7E00A2147A /* ContactDetailsViewController.m */; };
|
||||
D3128FE215AABC7E00A2147A /* ContactDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D3128FDF15AABC7E00A2147A /* ContactDetailsViewController.m */; };
|
||||
D3128FE315AABC7E00A2147A /* ContactDetailsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D3128FE015AABC7E00A2147A /* ContactDetailsViewController.xib */; };
|
||||
D3128FE415AABC7E00A2147A /* ContactDetailsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D3128FE015AABC7E00A2147A /* ContactDetailsViewController.xib */; };
|
||||
D3128FEF15AABE4E00A2147A /* contact_back_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3128FE715AABE4E00A2147A /* contact_back_default.png */; };
|
||||
D3128FF015AABE4E00A2147A /* contact_back_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3128FE715AABE4E00A2147A /* contact_back_default.png */; };
|
||||
D3128FF115AABE4E00A2147A /* contact_back_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3128FE815AABE4E00A2147A /* contact_back_over.png */; };
|
||||
D3128FF215AABE4E00A2147A /* contact_back_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3128FE815AABE4E00A2147A /* contact_back_over.png */; };
|
||||
D3128FF315AABE4E00A2147A /* contact_edit_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3128FE915AABE4E00A2147A /* contact_edit_default.png */; };
|
||||
D3128FF415AABE4E00A2147A /* contact_edit_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3128FE915AABE4E00A2147A /* contact_edit_default.png */; };
|
||||
D3128FF515AABE4E00A2147A /* contact_edit_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3128FEA15AABE4E00A2147A /* contact_edit_over.png */; };
|
||||
D3128FF615AABE4E00A2147A /* contact_edit_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3128FEA15AABE4E00A2147A /* contact_edit_over.png */; };
|
||||
D3196D2D15A3199D007FEEBA /* list_hightlight.png in Resources */ = {isa = PBXBuildFile; fileRef = D3196D2C15A3199D007FEEBA /* list_hightlight.png */; };
|
||||
D3196D2E15A3199D007FEEBA /* list_hightlight.png in Resources */ = {isa = PBXBuildFile; fileRef = D3196D2C15A3199D007FEEBA /* list_hightlight.png */; };
|
||||
D3196D3415A321E3007FEEBA /* options_add_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3196D3015A321E2007FEEBA /* options_add_default.png */; };
|
||||
|
|
@ -362,6 +374,16 @@
|
|||
D37B96B815A1A6F20005CCD2 /* call_state_delete_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D37B96B515A1A6F20005CCD2 /* call_state_delete_default.png */; };
|
||||
D37B96B915A1A6F20005CCD2 /* call_state_delete_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D37B96B615A1A6F20005CCD2 /* call_state_delete_over.png */; };
|
||||
D37B96BA15A1A6F20005CCD2 /* call_state_delete_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D37B96B615A1A6F20005CCD2 /* call_state_delete_over.png */; };
|
||||
D37C638E15AAD251009D0BAC /* contact_number_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D37C638C15AAD251009D0BAC /* contact_number_over.png */; };
|
||||
D37C638F15AAD251009D0BAC /* contact_number_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D37C638C15AAD251009D0BAC /* contact_number_over.png */; };
|
||||
D37C639015AAD251009D0BAC /* contact_number.png in Resources */ = {isa = PBXBuildFile; fileRef = D37C638D15AAD251009D0BAC /* contact_number.png */; };
|
||||
D37C639115AAD251009D0BAC /* contact_number.png in Resources */ = {isa = PBXBuildFile; fileRef = D37C638D15AAD251009D0BAC /* contact_number.png */; };
|
||||
D37C639515AADDAF009D0BAC /* UIContactDetailsHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = D37C639315AADDAE009D0BAC /* UIContactDetailsHeader.m */; };
|
||||
D37C639615AADDAF009D0BAC /* UIContactDetailsHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = D37C639315AADDAE009D0BAC /* UIContactDetailsHeader.m */; };
|
||||
D37C639715AADDAF009D0BAC /* UIContactDetailsHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37C639415AADDAF009D0BAC /* UIContactDetailsHeader.xib */; };
|
||||
D37C639815AADDAF009D0BAC /* UIContactDetailsHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = D37C639415AADDAF009D0BAC /* UIContactDetailsHeader.xib */; };
|
||||
D37C639B15AADEF6009D0BAC /* ContactDetailsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D37C639A15AADEF5009D0BAC /* ContactDetailsTableViewController.m */; };
|
||||
D37C639C15AADEF6009D0BAC /* ContactDetailsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D37C639A15AADEF5009D0BAC /* ContactDetailsTableViewController.m */; };
|
||||
D37DC6C11594AE1800B2A5EB /* LinphoneCoreSettingsStore.m in Sources */ = {isa = PBXBuildFile; fileRef = D37DC6C01594AE1800B2A5EB /* LinphoneCoreSettingsStore.m */; };
|
||||
D37DC6C21594AE1800B2A5EB /* LinphoneCoreSettingsStore.m in Sources */ = {isa = PBXBuildFile; fileRef = D37DC6C01594AE1800B2A5EB /* LinphoneCoreSettingsStore.m */; };
|
||||
D37DC6ED1594AE6F00B2A5EB /* IASKAppSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D37DC6C61594AE6F00B2A5EB /* IASKAppSettingsViewController.m */; };
|
||||
|
|
@ -667,10 +689,6 @@
|
|||
D3F83F7D1582253100336684 /* decline_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3F83F761582253100336684 /* decline_default.png */; };
|
||||
D3F83F7E1582253100336684 /* decline_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3F83F771582253100336684 /* decline_over.png */; };
|
||||
D3F83F7F1582253100336684 /* decline_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3F83F771582253100336684 /* decline_over.png */; };
|
||||
D3F83F841582278D00336684 /* cancel_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3F83F801582278D00336684 /* cancel_default.png */; };
|
||||
D3F83F851582278D00336684 /* cancel_default.png in Resources */ = {isa = PBXBuildFile; fileRef = D3F83F801582278D00336684 /* cancel_default.png */; };
|
||||
D3F83F861582278D00336684 /* cancel_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3F83F811582278D00336684 /* cancel_over.png */; };
|
||||
D3F83F871582278D00336684 /* cancel_over.png in Resources */ = {isa = PBXBuildFile; fileRef = D3F83F811582278D00336684 /* cancel_over.png */; };
|
||||
D3F83F8E15822ABE00336684 /* PhoneMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F83F8D15822ABD00336684 /* PhoneMainView.m */; };
|
||||
D3F83F8F15822ABE00336684 /* PhoneMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F83F8D15822ABD00336684 /* PhoneMainView.m */; };
|
||||
D3F83F9215824D3600336684 /* LinphoneApp.xib in Resources */ = {isa = PBXBuildFile; fileRef = D3F83F9115824D3500336684 /* LinphoneApp.xib */; };
|
||||
|
|
@ -1001,6 +1019,13 @@
|
|||
70E542F213E147E3002BA2C0 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
|
||||
70E542F413E147EB002BA2C0 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
8D1107310486CEB800E47090 /* linphone-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "linphone-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
|
||||
D3128FDE15AABC7E00A2147A /* ContactDetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactDetailsViewController.h; sourceTree = "<group>"; };
|
||||
D3128FDF15AABC7E00A2147A /* ContactDetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactDetailsViewController.m; sourceTree = "<group>"; };
|
||||
D3128FE015AABC7E00A2147A /* ContactDetailsViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ContactDetailsViewController.xib; sourceTree = "<group>"; };
|
||||
D3128FE715AABE4E00A2147A /* contact_back_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = contact_back_default.png; path = Resources/contact_back_default.png; sourceTree = "<group>"; };
|
||||
D3128FE815AABE4E00A2147A /* contact_back_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = contact_back_over.png; path = Resources/contact_back_over.png; sourceTree = "<group>"; };
|
||||
D3128FE915AABE4E00A2147A /* contact_edit_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = contact_edit_default.png; path = Resources/contact_edit_default.png; sourceTree = "<group>"; };
|
||||
D3128FEA15AABE4E00A2147A /* contact_edit_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = contact_edit_over.png; path = Resources/contact_edit_over.png; sourceTree = "<group>"; };
|
||||
D3196D2C15A3199D007FEEBA /* list_hightlight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = list_hightlight.png; path = Resources/list_hightlight.png; sourceTree = "<group>"; };
|
||||
D3196D3015A321E2007FEEBA /* options_add_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = options_add_default.png; path = Resources/options_add_default.png; sourceTree = "<group>"; };
|
||||
D3196D3115A321E2007FEEBA /* options_add_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = options_add_over.png; path = Resources/options_add_over.png; sourceTree = "<group>"; };
|
||||
|
|
@ -1130,6 +1155,13 @@
|
|||
D377BBF915A19DA6002B696B /* video_on_disabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = video_on_disabled.png; path = Resources/video_on_disabled.png; sourceTree = "<group>"; };
|
||||
D37B96B515A1A6F20005CCD2 /* call_state_delete_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = call_state_delete_default.png; path = Resources/call_state_delete_default.png; sourceTree = "<group>"; };
|
||||
D37B96B615A1A6F20005CCD2 /* call_state_delete_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = call_state_delete_over.png; path = Resources/call_state_delete_over.png; sourceTree = "<group>"; };
|
||||
D37C638C15AAD251009D0BAC /* contact_number_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = contact_number_over.png; path = Resources/contact_number_over.png; sourceTree = "<group>"; };
|
||||
D37C638D15AAD251009D0BAC /* contact_number.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = contact_number.png; path = Resources/contact_number.png; sourceTree = "<group>"; };
|
||||
D37C639215AADDAE009D0BAC /* UIContactDetailsHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIContactDetailsHeader.h; sourceTree = "<group>"; };
|
||||
D37C639315AADDAE009D0BAC /* UIContactDetailsHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIContactDetailsHeader.m; sourceTree = "<group>"; };
|
||||
D37C639415AADDAF009D0BAC /* UIContactDetailsHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UIContactDetailsHeader.xib; sourceTree = "<group>"; };
|
||||
D37C639915AADEF4009D0BAC /* ContactDetailsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactDetailsTableViewController.h; sourceTree = "<group>"; };
|
||||
D37C639A15AADEF5009D0BAC /* ContactDetailsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactDetailsTableViewController.m; sourceTree = "<group>"; };
|
||||
D37DC6BF1594AE1800B2A5EB /* LinphoneCoreSettingsStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinphoneCoreSettingsStore.h; sourceTree = "<group>"; };
|
||||
D37DC6C01594AE1800B2A5EB /* LinphoneCoreSettingsStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LinphoneCoreSettingsStore.m; sourceTree = "<group>"; };
|
||||
D37DC6C51594AE6F00B2A5EB /* IASKAppSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKAppSettingsViewController.h; sourceTree = "<group>"; };
|
||||
|
|
@ -1322,8 +1354,6 @@
|
|||
D3F83F751582253100336684 /* accept_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = accept_over.png; path = Resources/accept_over.png; sourceTree = "<group>"; };
|
||||
D3F83F761582253100336684 /* decline_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = decline_default.png; path = Resources/decline_default.png; sourceTree = "<group>"; };
|
||||
D3F83F771582253100336684 /* decline_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = decline_over.png; path = Resources/decline_over.png; sourceTree = "<group>"; };
|
||||
D3F83F801582278D00336684 /* cancel_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = cancel_default.png; path = Resources/cancel_default.png; sourceTree = "<group>"; };
|
||||
D3F83F811582278D00336684 /* cancel_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = cancel_over.png; path = Resources/cancel_over.png; sourceTree = "<group>"; };
|
||||
D3F83F8C158229C500336684 /* PhoneMainView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhoneMainView.h; sourceTree = "<group>"; };
|
||||
D3F83F8D15822ABD00336684 /* PhoneMainView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhoneMainView.m; sourceTree = "<group>"; };
|
||||
D3F83F9115824D3500336684 /* LinphoneApp.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LinphoneApp.xib; sourceTree = "<group>"; };
|
||||
|
|
@ -1449,6 +1479,11 @@
|
|||
22E0A820111C44E100B04932 /* ConsoleViewController.h */,
|
||||
22E0A81F111C44E100B04932 /* ConsoleViewController.m */,
|
||||
22E0A81E111C44E100B04932 /* ConsoleViewController.xib */,
|
||||
D37C639915AADEF4009D0BAC /* ContactDetailsTableViewController.h */,
|
||||
D37C639A15AADEF5009D0BAC /* ContactDetailsTableViewController.m */,
|
||||
D3128FDE15AABC7E00A2147A /* ContactDetailsViewController.h */,
|
||||
D3128FDF15AABC7E00A2147A /* ContactDetailsViewController.m */,
|
||||
D3128FE015AABC7E00A2147A /* ContactDetailsViewController.xib */,
|
||||
D3549814158761CF000081D8 /* ContactsTableViewController.h */,
|
||||
D3549815158761D0000081D8 /* ContactsTableViewController.m */,
|
||||
D35497FB15875372000081D8 /* ContactsViewController.h */,
|
||||
|
|
@ -1744,6 +1779,9 @@
|
|||
D3A55FBA15877E5E003FD403 /* UIContactCell.h */,
|
||||
D3A55FBB15877E5E003FD403 /* UIContactCell.m */,
|
||||
D3A55FBE15877E69003FD403 /* UIContactCell.xib */,
|
||||
D37C639215AADDAE009D0BAC /* UIContactDetailsHeader.h */,
|
||||
D37C639315AADDAE009D0BAC /* UIContactDetailsHeader.m */,
|
||||
D37C639415AADDAF009D0BAC /* UIContactDetailsHeader.xib */,
|
||||
2248E90C12F7E4CF00220D9C /* UIDigitButton.h */,
|
||||
2248E90D12F7E4CF00220D9C /* UIDigitButton.m */,
|
||||
22BB1A67132FF16A005CD7AA /* UIEraseButton.h */,
|
||||
|
|
@ -1938,7 +1976,6 @@
|
|||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D3D14E7B15A711700074A527 /* avatar_shadow_small.png */,
|
||||
D3F83F741582253100336684 /* accept_default.png */,
|
||||
D3F83F751582253100336684 /* accept_over.png */,
|
||||
D3D6A39B159B0EEF005F692C /* add_call_default.png */,
|
||||
|
|
@ -1948,6 +1985,7 @@
|
|||
D3ED3E6815861A53006C0DE4 /* add_contact_disabled.png */,
|
||||
D3ED3E6915861A53006C0DE4 /* add_contact_over.png */,
|
||||
D3F34F2F1599B008005BE94F /* avatar_shadow.png */,
|
||||
D3D14E7B15A711700074A527 /* avatar_shadow_small.png */,
|
||||
D31B4B261598A390002E6C72 /* avatar_unknown.png */,
|
||||
D31B4B271598A390002E6C72 /* avatar_unknown_small.png */,
|
||||
D3211BBB159CBFD60098460B /* back_default.png */,
|
||||
|
|
@ -1976,8 +2014,6 @@
|
|||
D31C9C8D158A1C1000756B45 /* call_status_incoming.png */,
|
||||
D31C9C8E158A1C1000756B45 /* call_status_missed.png */,
|
||||
D31C9C8F158A1C1000756B45 /* call_status_outgoing.png */,
|
||||
D3F83F801582278D00336684 /* cancel_default.png */,
|
||||
D3F83F811582278D00336684 /* cancel_over.png */,
|
||||
D36C43CC158F2F370048BA40 /* cell_call.png */,
|
||||
D3211BB8159C8A820098460B /* cell_call_first.png */,
|
||||
D38D14AD15A30B3D008497E8 /* cell_call_first_hightlight.png */,
|
||||
|
|
@ -2004,6 +2040,12 @@
|
|||
D3B9A3DE15A58C450096EA4E /* chat_send_over.png */,
|
||||
D31AAF61159B5B6E002C6B02 /* conference_default.png */,
|
||||
D31AAF62159B5B6E002C6B02 /* conference_over.png */,
|
||||
D3128FE715AABE4E00A2147A /* contact_back_default.png */,
|
||||
D3128FE815AABE4E00A2147A /* contact_back_over.png */,
|
||||
D3128FE915AABE4E00A2147A /* contact_edit_default.png */,
|
||||
D3128FEA15AABE4E00A2147A /* contact_edit_over.png */,
|
||||
D37C638D15AAD251009D0BAC /* contact_number.png */,
|
||||
D37C638C15AAD251009D0BAC /* contact_number_over.png */,
|
||||
D354980E15875608000081D8 /* contacts_add_default.png */,
|
||||
D354980F15875608000081D8 /* contacts_add_over.png */,
|
||||
D354980315875534000081D8 /* contacts_all_default.png */,
|
||||
|
|
@ -2442,8 +2484,6 @@
|
|||
D3F83F7A1582253100336684 /* accept_over.png in Resources */,
|
||||
D3F83F7C1582253100336684 /* decline_default.png in Resources */,
|
||||
D3F83F7E1582253100336684 /* decline_over.png in Resources */,
|
||||
D3F83F841582278D00336684 /* cancel_default.png in Resources */,
|
||||
D3F83F861582278D00336684 /* cancel_over.png in Resources */,
|
||||
D3F83F9215824D3600336684 /* LinphoneApp.xib in Resources */,
|
||||
D3ED3E411585FB4A006C0DE4 /* numpad_background.png in Resources */,
|
||||
D3ED3E451585FB8C006C0DE4 /* dialer_address_background.png in Resources */,
|
||||
|
|
@ -2595,6 +2635,14 @@
|
|||
D389363B15A6D53200A3A3AA /* chat_bubble_outgoing.9.png in Resources */,
|
||||
D3D14E7915A70EE30074A527 /* UIChatRoomHeader.xib in Resources */,
|
||||
D3D14E7C15A711700074A527 /* avatar_shadow_small.png in Resources */,
|
||||
D3128FE315AABC7E00A2147A /* ContactDetailsViewController.xib in Resources */,
|
||||
D3128FEF15AABE4E00A2147A /* contact_back_default.png in Resources */,
|
||||
D3128FF115AABE4E00A2147A /* contact_back_over.png in Resources */,
|
||||
D3128FF315AABE4E00A2147A /* contact_edit_default.png in Resources */,
|
||||
D3128FF515AABE4E00A2147A /* contact_edit_over.png in Resources */,
|
||||
D37C638E15AAD251009D0BAC /* contact_number_over.png in Resources */,
|
||||
D37C639015AAD251009D0BAC /* contact_number.png in Resources */,
|
||||
D37C639715AADDAF009D0BAC /* UIContactDetailsHeader.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -2663,8 +2711,6 @@
|
|||
D3F83F7B1582253100336684 /* accept_over.png in Resources */,
|
||||
D3F83F7D1582253100336684 /* decline_default.png in Resources */,
|
||||
D3F83F7F1582253100336684 /* decline_over.png in Resources */,
|
||||
D3F83F851582278D00336684 /* cancel_default.png in Resources */,
|
||||
D3F83F871582278D00336684 /* cancel_over.png in Resources */,
|
||||
D3F83F9315824D3600336684 /* LinphoneApp.xib in Resources */,
|
||||
D3ED3E421585FB4A006C0DE4 /* numpad_background.png in Resources */,
|
||||
D3ED3E461585FB8C006C0DE4 /* dialer_address_background.png in Resources */,
|
||||
|
|
@ -2815,6 +2861,14 @@
|
|||
D389363C15A6D53200A3A3AA /* chat_bubble_outgoing.9.png in Resources */,
|
||||
D3D14E7A15A70EE30074A527 /* UIChatRoomHeader.xib in Resources */,
|
||||
D3D14E7D15A711700074A527 /* avatar_shadow_small.png in Resources */,
|
||||
D3128FE415AABC7E00A2147A /* ContactDetailsViewController.xib in Resources */,
|
||||
D3128FF015AABE4E00A2147A /* contact_back_default.png in Resources */,
|
||||
D3128FF215AABE4E00A2147A /* contact_back_over.png in Resources */,
|
||||
D3128FF415AABE4E00A2147A /* contact_edit_default.png in Resources */,
|
||||
D3128FF615AABE4E00A2147A /* contact_edit_over.png in Resources */,
|
||||
D37C638F15AAD251009D0BAC /* contact_number_over.png in Resources */,
|
||||
D37C639115AAD251009D0BAC /* contact_number.png in Resources */,
|
||||
D37C639815AADDAF009D0BAC /* UIContactDetailsHeader.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -2897,6 +2951,9 @@
|
|||
D389362615A6D19800A3A3AA /* CPAnimationSequence.m in Sources */,
|
||||
D389362815A6D19800A3A3AA /* CPAnimationStep.m in Sources */,
|
||||
D3D14E7715A70EE30074A527 /* UIChatRoomHeader.m in Sources */,
|
||||
D3128FE115AABC7E00A2147A /* ContactDetailsViewController.m in Sources */,
|
||||
D37C639515AADDAF009D0BAC /* UIContactDetailsHeader.m in Sources */,
|
||||
D37C639B15AADEF6009D0BAC /* ContactDetailsTableViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -2976,6 +3033,9 @@
|
|||
D389362715A6D19800A3A3AA /* CPAnimationSequence.m in Sources */,
|
||||
D389362915A6D19800A3A3AA /* CPAnimationStep.m in Sources */,
|
||||
D3D14E7815A70EE30074A527 /* UIChatRoomHeader.m in Sources */,
|
||||
D3128FE215AABC7E00A2147A /* ContactDetailsViewController.m in Sources */,
|
||||
D37C639615AADDAF009D0BAC /* UIContactDetailsHeader.m in Sources */,
|
||||
D37C639C15AADEF6009D0BAC /* ContactDetailsTableViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
|||