mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Migrate to ARC \o/
This commit is contained in:
parent
87c75b2e1e
commit
b6d8afe22e
143 changed files with 685 additions and 1380 deletions
|
|
@ -24,15 +24,15 @@
|
|||
@interface AboutViewController : UIViewController<UICompositeViewDelegate, UIWebViewDelegate> {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel *linphoneLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *linphoneIphoneVersionLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *linphoneCoreVersionLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIView *contentView;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *linkLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *copyrightLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *licenseLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIWebView *licensesView;
|
||||
@property (nonatomic, retain) IBOutlet UITapGestureRecognizer *linkTapGestureRecognizer;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *linphoneLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *linphoneIphoneVersionLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *linphoneCoreVersionLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIView *contentView;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *linkLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *copyrightLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *licenseLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIWebView *licensesView;
|
||||
@property (nonatomic, strong) IBOutlet UITapGestureRecognizer *linkTapGestureRecognizer;
|
||||
|
||||
- (IBAction)onLinkTap:(id)sender;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,16 +45,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[linphoneCoreVersionLabel release];
|
||||
[linphoneIphoneVersionLabel release];
|
||||
[contentView release];
|
||||
[linkTapGestureRecognizer release];
|
||||
[linkLabel release];
|
||||
[licensesView release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
MSList *messageList;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) id<ChatRoomDelegate> chatRoomDelegate;
|
||||
@property (nonatomic, strong) id<ChatRoomDelegate> chatRoomDelegate;
|
||||
|
||||
- (void)addChatEntry:(LinphoneChatMessage*)chat;
|
||||
- (void)scrollToBottom:(BOOL)animated;
|
||||
|
|
|
|||
|
|
@ -32,10 +32,8 @@
|
|||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (void)dealloc {
|
||||
[chatRoomDelegate release];
|
||||
[self clearMessageList];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
|
@ -168,7 +166,7 @@
|
|||
static NSString *kCellId = @"UIChatRoomCell";
|
||||
UIChatRoomCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
|
||||
if (cell == nil) {
|
||||
cell = [[[UIChatRoomCell alloc] initWithIdentifier:kCellId] autorelease];
|
||||
cell = [[UIChatRoomCell alloc] initWithIdentifier:kCellId];
|
||||
}
|
||||
|
||||
LinphoneChatMessage* chat = ms_list_nth_data(self->messageList, (int)[indexPath row]);
|
||||
|
|
|
|||
|
|
@ -37,27 +37,27 @@
|
|||
BOOL composingVisible;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet ChatRoomTableViewController* tableController;
|
||||
@property (nonatomic, retain) IBOutlet UIToggleButton *editButton;
|
||||
@property (nonatomic, retain) IBOutlet HPGrowingTextView* messageField;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* sendButton;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *addressLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *avatarImage;
|
||||
@property (nonatomic, retain) IBOutlet UIView *headerView;
|
||||
@property (nonatomic, retain) IBOutlet UIView *chatView;
|
||||
@property (nonatomic, retain) IBOutlet UIView *messageView;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *messageBackgroundImage;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *transferBackgroundImage;
|
||||
@property (nonatomic, retain) IBOutlet UITapGestureRecognizer *listTapGestureRecognizer;
|
||||
@property (nonatomic, retain) IBOutlet UISwipeGestureRecognizer *listSwipeGestureRecognizer;
|
||||
@property (retain, nonatomic) IBOutlet UILabel *composeLabel;
|
||||
@property (retain, nonatomic) IBOutlet UIView *composeIndicatorView;
|
||||
@property (nonatomic, strong) IBOutlet ChatRoomTableViewController* tableController;
|
||||
@property (nonatomic, strong) IBOutlet UIToggleButton *editButton;
|
||||
@property (nonatomic, strong) IBOutlet HPGrowingTextView* messageField;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* sendButton;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *addressLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView *avatarImage;
|
||||
@property (nonatomic, strong) IBOutlet UIView *headerView;
|
||||
@property (nonatomic, strong) IBOutlet UIView *chatView;
|
||||
@property (nonatomic, strong) IBOutlet UIView *messageView;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView *messageBackgroundImage;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView *transferBackgroundImage;
|
||||
@property (nonatomic, strong) IBOutlet UITapGestureRecognizer *listTapGestureRecognizer;
|
||||
@property (nonatomic, strong) IBOutlet UISwipeGestureRecognizer *listSwipeGestureRecognizer;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *composeLabel;
|
||||
@property (strong, nonatomic) IBOutlet UIView *composeIndicatorView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* pictureButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* cancelTransferButton;
|
||||
@property (nonatomic, retain) IBOutlet UIProgressView* imageTransferProgressBar;
|
||||
@property (nonatomic, retain) IBOutlet UIView* transferView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* waitView;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* pictureButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* cancelTransferButton;
|
||||
@property (nonatomic, strong) IBOutlet UIProgressView* imageTransferProgressBar;
|
||||
@property (nonatomic, strong) IBOutlet UIView* transferView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* waitView;
|
||||
|
||||
- (IBAction)onBackClick:(id)event;
|
||||
- (IBAction)onEditClick:(id)event;
|
||||
|
|
|
|||
|
|
@ -70,31 +70,10 @@
|
|||
|
||||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[tableController release];
|
||||
[messageField release];
|
||||
[sendButton release];
|
||||
[editButton release];
|
||||
[addressLabel release];
|
||||
[avatarImage release];
|
||||
[headerView release];
|
||||
[messageView release];
|
||||
[messageBackgroundImage release];
|
||||
[transferBackgroundImage release];
|
||||
|
||||
[listTapGestureRecognizer release];
|
||||
[listSwipeGestureRecognizer release];
|
||||
|
||||
[transferView release];
|
||||
[pictureButton release];
|
||||
[imageTransferProgressBar release];
|
||||
[cancelTransferButton release];
|
||||
|
||||
[imageQualities release];
|
||||
[waitView release];
|
||||
|
||||
[composeLabel release];
|
||||
[composeIndicatorView release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -277,7 +256,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
return;
|
||||
}
|
||||
char *tmp = linphone_address_as_string_uri_only(linphoneAddress);
|
||||
|
|
@ -309,7 +287,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
|
||||
static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState state,void* ud) {
|
||||
ChatRoomViewController* thiz = (ChatRoomViewController*)ud;
|
||||
ChatRoomViewController* thiz = (__bridge ChatRoomViewController*)ud;
|
||||
const char*text = linphone_chat_message_get_text(msg);
|
||||
LOGI(@"Delivery status for [%s] is [%s]",text,linphone_chat_message_state_to_string(state));
|
||||
[thiz.tableController updateChatEntry:msg];
|
||||
|
|
@ -326,7 +304,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
linphone_chat_message_set_external_body_url(msg, [[externalUrl absoluteString] UTF8String]);
|
||||
}
|
||||
|
||||
linphone_chat_room_send_message2(chatRoom, msg, message_status, self);
|
||||
linphone_chat_room_send_message2(chatRoom, msg, message_status, (__bridge void *)(self));
|
||||
|
||||
if ( internalUrl ) {
|
||||
// internal url is saved in the appdata for display and later save
|
||||
|
|
@ -357,7 +335,6 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
cancelButtonTitle:NSLocalizedString(@"Ok",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[errorAlert show];
|
||||
[errorAlert release];
|
||||
return;
|
||||
}
|
||||
LOGI(@"Image saved to [%@]", [assetURL absoluteString]);
|
||||
|
|
@ -584,7 +561,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
}
|
||||
};
|
||||
|
||||
DTActionSheet *sheet = [[[DTActionSheet alloc] initWithTitle:NSLocalizedString(@"Select picture source",nil)] autorelease];
|
||||
DTActionSheet *sheet = [[DTActionSheet alloc] initWithTitle:NSLocalizedString(@"Select picture source",nil)];
|
||||
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
|
||||
[sheet addButtonWithTitle:NSLocalizedString(@"Camera",nil) block:^(){
|
||||
block(UIImagePickerControllerSourceTypeCamera);
|
||||
|
|
@ -643,7 +620,6 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
- (void)imageSharingAborted:(ImageSharing*)aimageSharing {
|
||||
[messageView setHidden:FALSE];
|
||||
[transferView setHidden:TRUE];
|
||||
[imageSharing release];
|
||||
imageSharing = nil;
|
||||
}
|
||||
|
||||
|
|
@ -659,7 +635,6 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
cancelButtonTitle:NSLocalizedString(@"Ok",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[errorAlert show];
|
||||
[errorAlert release];
|
||||
} else {
|
||||
LOGE(@"Cannot download file from [%@] because [%@]", url, [error localizedDescription]);
|
||||
UIAlertView* errorAlert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Transfer error", nil)
|
||||
|
|
@ -668,7 +643,6 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
cancelButtonTitle:NSLocalizedString(@"Continue", nil)
|
||||
otherButtonTitles:nil, nil];
|
||||
[errorAlert show];
|
||||
[errorAlert release];
|
||||
}
|
||||
imageSharing = nil;
|
||||
}
|
||||
|
|
@ -698,7 +672,6 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
cancelButtonTitle:NSLocalizedString(@"Ok",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[errorAlert show];
|
||||
[errorAlert release];
|
||||
return;
|
||||
}
|
||||
LOGI(@"Image saved to [%@]", [assetURL absoluteString]);
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@
|
|||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
||||
|
|
@ -115,10 +112,10 @@ static void chatTable_free_chatrooms(void *data){
|
|||
static NSString *kCellId = @"UIChatCell";
|
||||
UIChatCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
|
||||
if (cell == nil) {
|
||||
cell = [[[UIChatCell alloc] initWithIdentifier:kCellId] autorelease];
|
||||
cell = [[UIChatCell alloc] initWithIdentifier:kCellId];
|
||||
|
||||
// Background View
|
||||
UACellBackgroundView *selectedBackgroundView = [[[UACellBackgroundView alloc] initWithFrame:CGRectZero] autorelease];
|
||||
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
|
||||
cell.selectedBackgroundView = selectedBackgroundView;
|
||||
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@
|
|||
@interface ChatViewController : UIViewController<UITextFieldDelegate,UICompositeViewDelegate> {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet ChatTableViewController* tableController;
|
||||
@property (nonatomic, retain) IBOutlet UIToggleButton *editButton;
|
||||
@property (nonatomic, retain) IBOutlet UITextField *addressField;
|
||||
@property (nonatomic, strong) IBOutlet ChatTableViewController* tableController;
|
||||
@property (nonatomic, strong) IBOutlet UIToggleButton *editButton;
|
||||
@property (nonatomic, strong) IBOutlet UITextField *addressField;
|
||||
|
||||
- (IBAction)onAddClick:(id) event;
|
||||
- (IBAction)onEditClick:(id) event;
|
||||
|
|
|
|||
|
|
@ -36,11 +36,7 @@
|
|||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[tableController release];
|
||||
[editButton release];
|
||||
[addressField release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
|
@ -123,7 +119,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
cancelButtonTitle:NSLocalizedString(@"Cancel", nil)
|
||||
otherButtonTitles:nil];
|
||||
[alert show];
|
||||
[alert release];
|
||||
}
|
||||
addressField.text = @"";
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@
|
|||
}
|
||||
|
||||
@property (nonatomic, copy) NSString *selectedData;
|
||||
@property (nonatomic, retain) NSDictionary *dataList;
|
||||
@property (nonatomic, retain) IBOutlet UITableView *tableView;
|
||||
@property (nonatomic, retain) id<ContactDetailsLabelViewDelegate> delegate;
|
||||
@property (nonatomic, strong) NSDictionary *dataList;
|
||||
@property (nonatomic, strong) IBOutlet UITableView *tableView;
|
||||
@property (nonatomic, strong) id<ContactDetailsLabelViewDelegate> delegate;
|
||||
|
||||
- (IBAction)onBackClick:(id)event;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,14 +33,6 @@
|
|||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (void)dealloc {
|
||||
[selectedData release];
|
||||
[dataList release];
|
||||
[tableView release];
|
||||
[delegate release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
|
@ -87,16 +79,12 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
if([dataList isEqualToDictionary:adatalist]) {
|
||||
return;
|
||||
}
|
||||
[dataList release];
|
||||
dataList = [adatalist retain];
|
||||
dataList = adatalist;
|
||||
[tableView reloadData];
|
||||
}
|
||||
|
||||
|
||||
- (void)setSelectedData:(NSString *)aselectedData {
|
||||
if (selectedData != nil) {
|
||||
[selectedData release];
|
||||
}
|
||||
selectedData = [[NSString alloc] initWithString:aselectedData];
|
||||
[tableView reloadData];
|
||||
}
|
||||
|
|
@ -116,10 +104,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
static NSString *kCellId = @"ContactDetailsLabelCell";
|
||||
UITableViewCell *cell = [atableView dequeueReusableCellWithIdentifier:kCellId];
|
||||
if (cell == nil) {
|
||||
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kCellId] autorelease];
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kCellId];
|
||||
|
||||
// Background View
|
||||
UACellBackgroundView *selectedBackgroundView = [[[UACellBackgroundView alloc] initWithFrame:CGRectZero] autorelease];
|
||||
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
|
||||
cell.selectedBackgroundView = selectedBackgroundView;
|
||||
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@ typedef enum _ContactSections {
|
|||
}
|
||||
|
||||
@property (nonatomic, assign) ABRecordRef contact;
|
||||
@property (nonatomic, retain) IBOutlet id<ContactDetailsDelegate> contactDetailsDelegate;
|
||||
@property (nonatomic, retain) IBOutlet UIContactDetailsHeader *headerController;
|
||||
@property (nonatomic, retain) IBOutlet UIContactDetailsFooter *footerController;
|
||||
@property (nonatomic, strong) IBOutlet id<ContactDetailsDelegate> contactDetailsDelegate;
|
||||
@property (nonatomic, strong) IBOutlet UIContactDetailsHeader *headerController;
|
||||
@property (nonatomic, strong) IBOutlet UIContactDetailsFooter *footerController;
|
||||
|
||||
- (BOOL)isValid;
|
||||
- (void)addPhoneField:(NSString*)number;
|
||||
|
|
|
|||
|
|
@ -46,9 +46,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
@ -100,13 +97,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
if(contact != nil && ABRecordGetRecordID(contact) == kABRecordInvalidID) {
|
||||
CFRelease(contact);
|
||||
}
|
||||
if(editingIndexPath != nil) {
|
||||
[editingIndexPath release];
|
||||
}
|
||||
[labelArray release];
|
||||
[dataCache release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -160,10 +151,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
}
|
||||
|
||||
+ (NSString*)localizeLabel:(NSString*)str {
|
||||
CFStringRef lLocalizedLabel = ABAddressBookCopyLocalizedLabel((CFStringRef) str);
|
||||
NSString * retStr = [NSString stringWithString:(NSString*) lLocalizedLabel];
|
||||
CFRelease(lLocalizedLabel);
|
||||
return retStr;
|
||||
return (NSString*) CFBridgingRelease(ABAddressBookCopyLocalizedLabel((__bridge CFStringRef) str));
|
||||
}
|
||||
|
||||
- (NSDictionary*)getLocalizedLabels {
|
||||
|
|
@ -171,7 +159,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
for(NSString *str in labelArray) {
|
||||
[dict setObject:[ContactDetailsTableViewController localizeLabel:str] forKey:str];
|
||||
}
|
||||
return [dict autorelease];
|
||||
return dict;
|
||||
}
|
||||
|
||||
- (void)loadData {
|
||||
|
|
@ -190,7 +178,6 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
ABMultiValueIdentifier identifier = ABMultiValueGetIdentifierAtIndex(lMap, i);
|
||||
Entry *entry = [[Entry alloc] initWithData:identifier];
|
||||
[subArray addObject: entry];
|
||||
[entry release];
|
||||
}
|
||||
CFRelease(lMap);
|
||||
}
|
||||
|
|
@ -229,7 +216,6 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
if(add) {
|
||||
Entry *entry = [[Entry alloc] initWithData:identifier];
|
||||
[subArray addObject: entry];
|
||||
[entry release];
|
||||
}
|
||||
CFRelease(lDict);
|
||||
}
|
||||
|
|
@ -249,7 +235,6 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
CFDictionaryRef lDict = ABMultiValueCopyValueAtIndex(lMap, i);
|
||||
Entry *entry = [[Entry alloc] initWithData:identifier];
|
||||
[subArray addObject: entry];
|
||||
[entry release];
|
||||
CFRelease(lDict);
|
||||
}
|
||||
CFRelease(lMap);
|
||||
|
|
@ -273,25 +258,25 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
lMap = ABMultiValueCreateMutable(kABStringPropertyType);
|
||||
}
|
||||
ABMultiValueIdentifier index;
|
||||
NSError* error = NULL;
|
||||
CFErrorRef error = NULL;
|
||||
|
||||
CFStringRef keys[] = { kABPersonInstantMessageUsernameKey, kABPersonInstantMessageServiceKey};
|
||||
CFTypeRef values[] = { [value copy], [LinphoneManager instance].contactSipField };
|
||||
CFTypeRef values[] = { CFBridgingRetain([value copy]), (__bridge CFTypeRef)([LinphoneManager instance].contactSipField) };
|
||||
CFDictionaryRef lDict = CFDictionaryCreate(NULL, (const void **)&keys, (const void **)&values, 2, NULL, NULL);
|
||||
if (entry) {
|
||||
index = (int)ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
|
||||
ABMultiValueReplaceValueAtIndex(lMap, lDict, index);
|
||||
} else {
|
||||
CFStringRef label = (CFStringRef)[labelArray objectAtIndex:0];
|
||||
CFStringRef label = (__bridge CFStringRef)[labelArray objectAtIndex:0];
|
||||
ABMultiValueAddValueAndLabel(lMap, lDict, label, &index);
|
||||
}
|
||||
|
||||
if (!ABRecordSetValue(contact, kABPersonInstantMessageProperty, lMap, (CFErrorRef*)&error)) {
|
||||
LOGI(@"Can't set contact with value [%@] cause [%@]", value,[error localizedDescription]);
|
||||
if (!ABRecordSetValue(contact, kABPersonInstantMessageProperty, lMap, &error)) {
|
||||
LOGI(@"Can't set contact with value [%@] cause [%@]", value,[(__bridge NSError*)error localizedDescription]);
|
||||
CFRelease(lMap);
|
||||
} else {
|
||||
if (entry == nil) {
|
||||
entry = [[[Entry alloc] initWithData:index] autorelease];
|
||||
entry = [[Entry alloc] initWithData:index];
|
||||
}
|
||||
CFRelease(lDict);
|
||||
CFRelease(lMap);
|
||||
|
|
@ -310,11 +295,11 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
if(address){
|
||||
char* uri = linphone_address_as_string_uri_only(address);
|
||||
CFStringRef keys[] = { kABPersonInstantMessageUsernameKey, kABPersonInstantMessageServiceKey};
|
||||
CFTypeRef values[] = { [NSString stringWithCString:uri encoding:[NSString defaultCStringEncoding]], [LinphoneManager instance].contactSipField };
|
||||
CFTypeRef values[] = { (__bridge CFTypeRef)([NSString stringWithCString:uri encoding:[NSString defaultCStringEncoding]]), (__bridge CFTypeRef)([LinphoneManager instance].contactSipField) };
|
||||
CFDictionaryRef lDict2 = CFDictionaryCreate(NULL, (const void **)&keys, (const void **)&values, 2, NULL, NULL);
|
||||
ABMultiValueReplaceValueAtIndex(lMap, lDict2, index);
|
||||
if (!ABRecordSetValue(contact, kABPersonInstantMessageProperty, lMap, (CFErrorRef*)&error)) {
|
||||
LOGI(@"Can't set contact with value [%@] cause [%@]", value,[error localizedDescription]);
|
||||
if (!ABRecordSetValue(contact, kABPersonInstantMessageProperty, lMap, &error)) {
|
||||
LOGI(@"Can't set contact with value [%@] cause [%@]", value,[(__bridge NSError*)error localizedDescription]);
|
||||
}
|
||||
CFRelease(lDict2);
|
||||
linphone_address_destroy(address);
|
||||
|
|
@ -338,7 +323,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
- (void)addEntry:(UITableView*)tableview section:(NSInteger)section animated:(BOOL)animated value:(NSString *)value{
|
||||
NSMutableArray *sectionArray = [self getSectionData:section];
|
||||
NSUInteger count = [sectionArray count];
|
||||
NSError* error = NULL;
|
||||
CFErrorRef error = NULL;
|
||||
bool added = TRUE;
|
||||
if(contactSections[section] == ContactSections_Number) {
|
||||
ABMultiValueIdentifier identifier;
|
||||
|
|
@ -350,18 +335,17 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
} else {
|
||||
lMap = ABMultiValueCreateMutable(kABStringPropertyType);
|
||||
}
|
||||
CFStringRef label = (CFStringRef)[labelArray objectAtIndex:0];
|
||||
if(!ABMultiValueAddValueAndLabel(lMap, [[value copy] autorelease], label, &identifier)) {
|
||||
CFStringRef label = (__bridge CFStringRef)[labelArray objectAtIndex:0];
|
||||
if(!ABMultiValueAddValueAndLabel(lMap, CFBridgingRetain([value copy]), label, &identifier)) {
|
||||
added = false;
|
||||
}
|
||||
|
||||
if(added && ABRecordSetValue(contact, kABPersonPhoneProperty, lMap, (CFErrorRef*)&error)) {
|
||||
if(added && ABRecordSetValue(contact, kABPersonPhoneProperty, lMap, &error)) {
|
||||
Entry *entry = [[Entry alloc] initWithData:identifier];
|
||||
[sectionArray addObject:entry];
|
||||
[entry release];
|
||||
} else {
|
||||
added = false;
|
||||
LOGI(@"Can't add entry: %@", [error localizedDescription]);
|
||||
LOGI(@"Can't add entry: %@", [(__bridge NSError*)error localizedDescription]);
|
||||
}
|
||||
CFRelease(lMap);
|
||||
} else if(contactSections[section] == ContactSections_Sip) {
|
||||
|
|
@ -383,18 +367,17 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
} else {
|
||||
lMap = ABMultiValueCreateMutable(kABStringPropertyType);
|
||||
}
|
||||
CFStringRef label = (CFStringRef)[labelArray objectAtIndex:0];
|
||||
if(!ABMultiValueAddValueAndLabel(lMap, [[value copy] autorelease], label, &identifier)) {
|
||||
CFStringRef label = (__bridge CFStringRef)[labelArray objectAtIndex:0];
|
||||
if(!ABMultiValueAddValueAndLabel(lMap, CFBridgingRetain([value copy]), label, &identifier)) {
|
||||
added = false;
|
||||
}
|
||||
|
||||
if(added && ABRecordSetValue(contact, kABPersonEmailProperty, lMap, (CFErrorRef*)&error)) {
|
||||
if(added && ABRecordSetValue(contact, kABPersonEmailProperty, lMap, &error)) {
|
||||
Entry *entry = [[Entry alloc] initWithData:identifier];
|
||||
[sectionArray addObject:entry];
|
||||
[entry release];
|
||||
} else {
|
||||
added = false;
|
||||
LOGI(@"Can't add entry: %@", [error localizedDescription]);
|
||||
LOGI(@"Can't add entry: %@", [(__bridge NSError*)error localizedDescription]);
|
||||
}
|
||||
CFRelease(lMap);
|
||||
}
|
||||
|
|
@ -427,7 +410,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
// when we query the instanteMsg property we get a dictionary instead of a value
|
||||
valueRef = CFDictionaryGetValue(valueRef, kABPersonInstantMessageUsernameKey);
|
||||
}
|
||||
if(![(NSString*) valueRef length]) {
|
||||
if(![(__bridge NSString*) valueRef length]) {
|
||||
[self removeEntry:tableview path:[NSIndexPath indexPathForRow:row inSection:section] animated:animated];
|
||||
}
|
||||
CFRelease(toRelease);
|
||||
|
|
@ -508,14 +491,14 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
static NSString *kCellId = @"ContactDetailsCell";
|
||||
UIEditableTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
|
||||
if (cell == nil) {
|
||||
cell = [[[UIEditableTableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:kCellId] autorelease];
|
||||
cell = [[UIEditableTableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:kCellId];
|
||||
[cell.detailTextField setDelegate:self];
|
||||
[cell.detailTextField setAutocapitalizationType:UITextAutocapitalizationTypeNone];
|
||||
[cell.detailTextField setAutocorrectionType:UITextAutocorrectionTypeNo];
|
||||
[cell setBackgroundColor:[UIColor whiteColor]];
|
||||
|
||||
// Background View
|
||||
UACellBackgroundView *selectedBackgroundView = [[[UACellBackgroundView alloc] initWithFrame:CGRectZero] autorelease];
|
||||
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
|
||||
cell.selectedBackgroundView = selectedBackgroundView;
|
||||
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
|
||||
}
|
||||
|
|
@ -532,13 +515,11 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
NSInteger index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
|
||||
CFStringRef labelRef = ABMultiValueCopyLabelAtIndex(lMap, index);
|
||||
if(labelRef != NULL) {
|
||||
label = [ContactDetailsTableViewController localizeLabel:(NSString*) labelRef];
|
||||
CFRelease(labelRef);
|
||||
label = [ContactDetailsTableViewController localizeLabel:(NSString*) CFBridgingRelease(labelRef)];
|
||||
}
|
||||
CFStringRef valueRef = ABMultiValueCopyValueAtIndex(lMap, index);
|
||||
NSString* valueRef = CFBridgingRelease(ABMultiValueCopyValueAtIndex(lMap, index));
|
||||
if(valueRef != NULL) {
|
||||
value = [ContactDetailsTableViewController localizeLabel:(NSString*) valueRef];
|
||||
CFRelease(valueRef);
|
||||
value = [ContactDetailsTableViewController localizeLabel:valueRef];
|
||||
}
|
||||
CFRelease(lMap);
|
||||
} else if(contactSections[[indexPath section]] == ContactSections_Sip) {
|
||||
|
|
@ -546,21 +527,20 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
NSInteger index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
|
||||
CFStringRef labelRef = ABMultiValueCopyLabelAtIndex(lMap, index);
|
||||
if(labelRef != NULL) {
|
||||
label = [ContactDetailsTableViewController localizeLabel:(NSString*) labelRef];
|
||||
CFRelease(labelRef);
|
||||
label = [ContactDetailsTableViewController localizeLabel:(NSString*) CFBridgingRelease(labelRef)];
|
||||
}
|
||||
CFDictionaryRef lDict = ABMultiValueCopyValueAtIndex(lMap, index);
|
||||
CFStringRef valueRef = CFDictionaryGetValue(lDict, kABPersonInstantMessageUsernameKey);
|
||||
if(valueRef != NULL) {
|
||||
LinphoneAddress* addr=NULL;
|
||||
if ([[LinphoneManager instance] lpConfigBoolForKey:@"contact_display_username_only"]
|
||||
&& (addr=linphone_address_new([(NSString *)valueRef UTF8String]))) {
|
||||
&& (addr=linphone_address_new([(NSString *)CFBridgingRelease(valueRef) UTF8String]))) {
|
||||
if (linphone_address_get_username(addr)) {
|
||||
value = [NSString stringWithCString:linphone_address_get_username(addr)
|
||||
encoding:[NSString defaultCStringEncoding]];
|
||||
} /*else value=@""*/
|
||||
} else {
|
||||
value = [NSString stringWithString:(NSString*) valueRef];
|
||||
value = (NSString*) CFBridgingRelease(valueRef);
|
||||
}
|
||||
if (addr) linphone_address_destroy(addr);
|
||||
}
|
||||
|
|
@ -571,13 +551,11 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
NSInteger index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
|
||||
CFStringRef labelRef = ABMultiValueCopyLabelAtIndex(lMap, index);
|
||||
if(labelRef != NULL) {
|
||||
label = [ContactDetailsTableViewController localizeLabel:(NSString*) labelRef];
|
||||
CFRelease(labelRef);
|
||||
label = [ContactDetailsTableViewController localizeLabel:(NSString*) CFBridgingRelease(labelRef)];
|
||||
}
|
||||
CFStringRef valueRef = ABMultiValueCopyValueAtIndex(lMap, index);
|
||||
if(valueRef != NULL) {
|
||||
value = [ContactDetailsTableViewController localizeLabel:(NSString*) valueRef];
|
||||
CFRelease(valueRef);
|
||||
value = [ContactDetailsTableViewController localizeLabel:(NSString*) CFBridgingRelease(valueRef)];
|
||||
}
|
||||
CFRelease(lMap);
|
||||
}
|
||||
|
|
@ -608,8 +586,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
NSInteger index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
|
||||
CFStringRef valueRef = ABMultiValueCopyValueAtIndex(lMap, index);
|
||||
if(valueRef != NULL) {
|
||||
dest = [ContactDetailsTableViewController localizeLabel:(NSString*) valueRef];
|
||||
CFRelease(valueRef);
|
||||
dest = [ContactDetailsTableViewController localizeLabel:(NSString*) CFBridgingRelease(valueRef)];
|
||||
}
|
||||
CFRelease(lMap);
|
||||
} else if(contactSections[[indexPath section]] == ContactSections_Sip) {
|
||||
|
|
@ -617,7 +594,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
NSInteger index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
|
||||
CFDictionaryRef lDict = ABMultiValueCopyValueAtIndex(lMap, index);
|
||||
CFStringRef valueRef = CFDictionaryGetValue(lDict, kABPersonInstantMessageUsernameKey);
|
||||
dest = [FastAddressBook normalizeSipURI:[NSString stringWithString:(NSString*) valueRef]];
|
||||
dest = [FastAddressBook normalizeSipURI:(NSString*) CFBridgingRelease(valueRef)];
|
||||
CFRelease(lDict);
|
||||
CFRelease(lMap);
|
||||
} else if(contactSections[[indexPath section]] == ContactSections_Email) {
|
||||
|
|
@ -625,8 +602,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
NSInteger index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
|
||||
CFStringRef valueRef = ABMultiValueCopyValueAtIndex(lMap, index);
|
||||
if(valueRef != NULL) {
|
||||
dest = [FastAddressBook normalizeSipURI:[NSString stringWithString:(NSString*) valueRef]];
|
||||
CFRelease(valueRef);
|
||||
dest = [FastAddressBook normalizeSipURI:(NSString*) CFBridgingRelease(valueRef)];
|
||||
}
|
||||
CFRelease(lMap);
|
||||
}
|
||||
|
|
@ -657,15 +633,11 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
NSInteger index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
|
||||
CFTypeRef labelRef = ABMultiValueCopyLabelAtIndex(lMap, index);
|
||||
if(labelRef != NULL) {
|
||||
key = [NSString stringWithString:(NSString*) labelRef];
|
||||
CFRelease(labelRef);
|
||||
key = (NSString*) CFBridgingRelease(labelRef);
|
||||
}
|
||||
CFRelease(lMap);
|
||||
}
|
||||
if(key != nil) {
|
||||
if(editingIndexPath != nil) {
|
||||
[editingIndexPath release];
|
||||
}
|
||||
editingIndexPath = [indexPath copy];
|
||||
ContactDetailsLabelViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[ContactDetailsLabelViewController compositeViewDescription] push:TRUE], ContactDetailsLabelViewController);
|
||||
if(controller != nil) {
|
||||
|
|
@ -821,7 +793,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
ABMutableMultiValueRef lMap = ABMultiValueCreateMutableCopy(lcMap);
|
||||
CFRelease(lcMap);
|
||||
NSInteger index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
|
||||
ABMultiValueReplaceLabelAtIndex(lMap, (CFStringRef)(value), index);
|
||||
ABMultiValueReplaceLabelAtIndex(lMap, (__bridge CFStringRef)(value), index);
|
||||
ABRecordSetValue(contact, kABPersonPhoneProperty, lMap, nil);
|
||||
CFRelease(lMap);
|
||||
}
|
||||
|
|
@ -831,7 +803,6 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
[self.tableView reloadSectionIndexTitles];
|
||||
[self.tableView endUpdates];
|
||||
}
|
||||
[editingIndexPath release];
|
||||
editingIndexPath = nil;
|
||||
}
|
||||
|
||||
|
|
@ -871,7 +842,7 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
|
|||
ABMutableMultiValueRef lMap = ABMultiValueCreateMutableCopy(lcMap);
|
||||
CFRelease(lcMap);
|
||||
NSInteger index = ABMultiValueGetIndexForIdentifier(lMap, [entry identifier]);
|
||||
ABMultiValueReplaceValueAtIndex(lMap, (CFStringRef)value, index);
|
||||
ABMultiValueReplaceValueAtIndex(lMap, (__bridge CFStringRef)value, index);
|
||||
ABRecordSetValue(contact, property, lMap, nil);
|
||||
CFRelease(lMap);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@
|
|||
}
|
||||
|
||||
@property (nonatomic, assign) ABRecordRef contact;
|
||||
@property (nonatomic, retain) IBOutlet ContactDetailsTableViewController *tableController;
|
||||
@property (nonatomic, retain) IBOutlet UIToggleButton *editButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *backButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *cancelButton;
|
||||
@property (nonatomic, strong) IBOutlet ContactDetailsTableViewController *tableController;
|
||||
@property (nonatomic, strong) IBOutlet UIToggleButton *editButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *backButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *cancelButton;
|
||||
|
||||
- (IBAction)onBackClick:(id)event;
|
||||
- (IBAction)onCancelClick:(id)event;
|
||||
|
|
|
|||
|
|
@ -38,21 +38,16 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
if(self != nil) {
|
||||
inhibUpdate = FALSE;
|
||||
addressBook = ABAddressBookCreateWithOptions(nil, nil);
|
||||
ABAddressBookRegisterExternalChangeCallback(addressBook, sync_address_book, self);
|
||||
ABAddressBookRegisterExternalChangeCallback(addressBook, sync_address_book, (__bridge void *)(self));
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
ABAddressBookUnregisterExternalChangeCallback(addressBook, sync_address_book, self);
|
||||
ABAddressBookUnregisterExternalChangeCallback(addressBook, sync_address_book, (__bridge void *)(self));
|
||||
CFRelease(addressBook);
|
||||
[tableController release];
|
||||
|
||||
[editButton release];
|
||||
[backButton release];
|
||||
[cancelButton release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -77,7 +72,7 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
}
|
||||
|
||||
static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
|
||||
ContactDetailsViewController* controller = (ContactDetailsViewController*)context;
|
||||
ContactDetailsViewController* controller = (__bridge ContactDetailsViewController*)context;
|
||||
if(!controller->inhibUpdate && ![[controller tableController] isEditing]) {
|
||||
[controller resetData];
|
||||
}
|
||||
|
|
@ -91,10 +86,10 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
|
||||
// Remove contact from book
|
||||
if(ABRecordGetRecordID(contact) != kABRecordInvalidID) {
|
||||
NSError* error = NULL;
|
||||
CFErrorRef error = NULL;
|
||||
ABAddressBookRemoveRecord(addressBook, contact, (CFErrorRef*)&error);
|
||||
if (error != NULL) {
|
||||
LOGE(@"Remove contact %p: Fail(%@)", contact, [error localizedDescription]);
|
||||
LOGE(@"Remove contact %p: Fail(%@)", contact, [(__bridge NSError*)error localizedDescription]);
|
||||
} else {
|
||||
LOGI(@"Remove contact %p: Success!", contact);
|
||||
}
|
||||
|
|
@ -106,7 +101,7 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
ABAddressBookSave(addressBook, (CFErrorRef*)&error);
|
||||
inhibUpdate = FALSE;
|
||||
if (error != NULL) {
|
||||
LOGE(@"Save AddressBook: Fail(%@)", [error localizedDescription]);
|
||||
LOGE(@"Save AddressBook: Fail(%@)", [(__bridge NSError*)error localizedDescription]);
|
||||
} else {
|
||||
LOGI(@"Save AddressBook: Success!");
|
||||
}
|
||||
|
|
@ -121,11 +116,11 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
}
|
||||
|
||||
// Add contact to book
|
||||
NSError* error = NULL;
|
||||
CFErrorRef error = NULL;
|
||||
if(ABRecordGetRecordID(contact) == kABRecordInvalidID) {
|
||||
ABAddressBookAddRecord(addressBook, contact, (CFErrorRef*)&error);
|
||||
if (error != NULL) {
|
||||
LOGE(@"Add contact %p: Fail(%@)", contact, [error localizedDescription]);
|
||||
LOGE(@"Add contact %p: Fail(%@)", contact, [(__bridge NSError*)error localizedDescription]);
|
||||
} else {
|
||||
LOGI(@"Add contact %p: Success!", contact);
|
||||
}
|
||||
|
|
@ -137,7 +132,7 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
ABAddressBookSave(addressBook, (CFErrorRef*)&error);
|
||||
inhibUpdate = FALSE;
|
||||
if (error != NULL) {
|
||||
LOGE(@"Save AddressBook: Fail(%@)", [error localizedDescription]);
|
||||
LOGE(@"Save AddressBook: Fail(%@)", [(__bridge NSError*)error localizedDescription]);
|
||||
} else {
|
||||
LOGI(@"Save AddressBook: Success!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
|
||||
addressBook = ABAddressBookCreateWithOptions(nil, nil);
|
||||
|
||||
ABAddressBookRegisterExternalChangeCallback(addressBook, sync_address_book, self);
|
||||
ABAddressBookRegisterExternalChangeCallback(addressBook, sync_address_book, (__bridge void *)(self));
|
||||
}
|
||||
|
||||
- (id)init {
|
||||
|
|
@ -58,11 +58,8 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
}
|
||||
|
||||
- (void)dealloc {
|
||||
ABAddressBookUnregisterExternalChangeCallback(addressBook, sync_address_book, self);
|
||||
ABAddressBookUnregisterExternalChangeCallback(addressBook, sync_address_book, (__bridge void *)(self));
|
||||
CFRelease(addressBook);
|
||||
[addressBookMap release];
|
||||
[avatarMap release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -133,10 +130,10 @@ static int ms_strcmpfuz(const char * fuzzy_word, const char * sentence) {
|
|||
// Reset Address book
|
||||
[addressBookMap removeAllObjects];
|
||||
|
||||
NSArray *lContacts = (NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook);
|
||||
NSArray *lContacts = (NSArray *)CFBridgingRelease(ABAddressBookCopyArrayOfAllPeople(addressBook));
|
||||
for (id lPerson in lContacts) {
|
||||
BOOL add = true;
|
||||
ABRecordRef person = (ABRecordRef)lPerson;
|
||||
ABRecordRef person = (ABRecordRef)CFBridgingRetain(lPerson);
|
||||
|
||||
// Do not add the contact directly if we set some filter
|
||||
if([ContactSelection getSipFilter] || [ContactSelection emailFilterEnabled]) {
|
||||
|
|
@ -154,21 +151,21 @@ static int ms_strcmpfuz(const char * fuzzy_word, const char * sentence) {
|
|||
}
|
||||
|
||||
if(add) {
|
||||
CFStringRef lFirstName = ABRecordCopyValue(person, kABPersonFirstNameProperty);
|
||||
CFStringRef lLocalizedFirstName = (lFirstName != nil)? ABAddressBookCopyLocalizedLabel(lFirstName): nil;
|
||||
CFStringRef lLastName = ABRecordCopyValue(person, kABPersonLastNameProperty);
|
||||
CFStringRef lLocalizedLastName = (lLastName != nil)? ABAddressBookCopyLocalizedLabel(lLastName): nil;
|
||||
CFStringRef lOrganization = ABRecordCopyValue(person, kABPersonOrganizationProperty);
|
||||
CFStringRef lLocalizedlOrganization = (lOrganization != nil)? ABAddressBookCopyLocalizedLabel(lOrganization): nil;
|
||||
NSString* lFirstName = CFBridgingRelease(ABRecordCopyValue(person, kABPersonFirstNameProperty));
|
||||
NSString* lLocalizedFirstName = (lFirstName != nil)? CFBridgingRelease(ABAddressBookCopyLocalizedLabel((__bridge CFStringRef)(lFirstName))): nil;
|
||||
NSString* lLastName = CFBridgingRelease(ABRecordCopyValue(person, kABPersonLastNameProperty));
|
||||
NSString* lLocalizedLastName = (lLastName != nil)? CFBridgingRelease(ABAddressBookCopyLocalizedLabel((__bridge CFStringRef)(lLastName))): nil;
|
||||
NSString* lOrganization = CFBridgingRelease(ABRecordCopyValue(person, kABPersonOrganizationProperty));
|
||||
NSString* lLocalizedlOrganization = (lOrganization != nil)? CFBridgingRelease(ABAddressBookCopyLocalizedLabel((__bridge CFStringRef)lOrganization)): nil;
|
||||
NSString *name = nil;
|
||||
if(lLocalizedFirstName != nil && lLocalizedLastName != nil) {
|
||||
name=[NSString stringWithFormat:@"%@ %@", [(NSString *)lLocalizedFirstName retain], [(NSString *)lLocalizedLastName retain]];
|
||||
name=[NSString stringWithFormat:@"%@ %@", lLocalizedFirstName, lLocalizedLastName];
|
||||
} else if(lLocalizedLastName != nil) {
|
||||
name=[NSString stringWithFormat:@"%@",[(NSString *)lLocalizedLastName retain]];
|
||||
name=[NSString stringWithFormat:@"%@",lLocalizedLastName];
|
||||
} else if(lLocalizedFirstName != nil) {
|
||||
name=[NSString stringWithFormat:@"%@",[(NSString *)lLocalizedFirstName retain]];
|
||||
name=[NSString stringWithFormat:@"%@",lLocalizedFirstName];
|
||||
} else if(lLocalizedlOrganization != nil) {
|
||||
name=[NSString stringWithFormat:@"%@",[(NSString *)lLocalizedlOrganization retain]];
|
||||
name=[NSString stringWithFormat:@"%@",lLocalizedlOrganization];
|
||||
}
|
||||
|
||||
if(name != nil && [name length] > 0) {
|
||||
|
|
@ -179,7 +176,7 @@ static int ms_strcmpfuz(const char * fuzzy_word, const char * sentence) {
|
|||
//Sort contacts by first letter. We need to translate the name to ASCII first, because of UTF-8 issues. For instance
|
||||
// we expect order: Alberta(A tilde) before ASylvano.
|
||||
NSData *name2ASCIIdata = [name dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
|
||||
NSString *name2ASCII = [[[NSString alloc] initWithData:name2ASCIIdata encoding:NSASCIIStringEncoding] autorelease];
|
||||
NSString *name2ASCII = [[NSString alloc] initWithData:name2ASCIIdata encoding:NSASCIIStringEncoding];
|
||||
NSString *firstChar = [[name2ASCII substringToIndex:1] uppercaseString];
|
||||
|
||||
// Put in correct subDic
|
||||
|
|
@ -188,34 +185,20 @@ static int ms_strcmpfuz(const char * fuzzy_word, const char * sentence) {
|
|||
}
|
||||
OrderedDictionary *subDic =[addressBookMap objectForKey: firstChar];
|
||||
if(subDic == nil) {
|
||||
subDic = [[[OrderedDictionary alloc] init] autorelease];
|
||||
subDic = [[OrderedDictionary alloc] init];
|
||||
[addressBookMap insertObject:subDic forKey:firstChar selector:@selector(caseInsensitiveCompare:)];
|
||||
}
|
||||
[subDic insertObject:lPerson forKey:name2ASCII selector:@selector(caseInsensitiveCompare:)];
|
||||
}
|
||||
}
|
||||
if(lLocalizedlOrganization != nil)
|
||||
CFRelease(lLocalizedlOrganization);
|
||||
if(lOrganization != nil)
|
||||
CFRelease(lOrganization);
|
||||
if(lLocalizedLastName != nil)
|
||||
CFRelease(lLocalizedLastName);
|
||||
if(lLastName != nil)
|
||||
CFRelease(lLastName);
|
||||
if(lLocalizedFirstName != nil)
|
||||
CFRelease(lLocalizedFirstName);
|
||||
if(lFirstName != nil)
|
||||
CFRelease(lFirstName);
|
||||
}
|
||||
}
|
||||
if (lContacts)
|
||||
CFRelease(lContacts);
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {
|
||||
ContactsTableViewController* controller = (ContactsTableViewController*)context;
|
||||
ContactsTableViewController* controller = (__bridge ContactsTableViewController*)context;
|
||||
ABAddressBookRevert(addressBook);
|
||||
[controller->avatarMap removeAllObjects];
|
||||
[controller loadData];
|
||||
|
|
@ -247,17 +230,17 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
static NSString *kCellId = @"UIContactCell";
|
||||
UIContactCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
|
||||
if (cell == nil) {
|
||||
cell = [[[UIContactCell alloc] initWithIdentifier:kCellId] autorelease];
|
||||
cell = [[UIContactCell alloc] initWithIdentifier:kCellId];
|
||||
|
||||
// Background View
|
||||
UACellBackgroundView *selectedBackgroundView = [[[UACellBackgroundView alloc] initWithFrame:CGRectZero] autorelease];
|
||||
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
|
||||
cell.selectedBackgroundView = selectedBackgroundView;
|
||||
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
|
||||
}
|
||||
OrderedDictionary *subDic = [addressBookMap objectForKey: [addressBookMap keyAtIndex: [indexPath section]]];
|
||||
|
||||
NSString *key = [[subDic allKeys] objectAtIndex:[indexPath row]];
|
||||
ABRecordRef contact = [subDic objectForKey:key];
|
||||
ABRecordRef contact = (__bridge ABRecordRef)([subDic objectForKey:key]);
|
||||
|
||||
// Cached avatar
|
||||
UIImage *image = nil;
|
||||
|
|
@ -287,7 +270,7 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
OrderedDictionary *subDic = [addressBookMap objectForKey: [addressBookMap keyAtIndex: [indexPath section]]];
|
||||
ABRecordRef lPerson = [subDic objectForKey: [subDic keyAtIndex:[indexPath row]]];
|
||||
ABRecordRef lPerson = (__bridge ABRecordRef)([subDic objectForKey: [subDic keyAtIndex:[indexPath row]]]);
|
||||
|
||||
// Go to Contact details view
|
||||
ContactDetailsViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[ContactDetailsViewController compositeViewDescription] push:TRUE], ContactDetailsViewController);
|
||||
|
|
|
|||
|
|
@ -79,15 +79,15 @@ typedef enum _ContactSelectionMode {
|
|||
BOOL use_systemView;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet ContactsTableViewController* tableController;
|
||||
@property (nonatomic, retain) IBOutlet UITableView *tableView;
|
||||
@property (nonatomic, retain) IBOutlet UINavigationController* sysViewController;
|
||||
@property (retain, nonatomic) IBOutlet UIView *toolBar;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* allButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* linphoneButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *backButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *addButton;
|
||||
@property (retain, nonatomic) IBOutlet UISearchBar *searchBar;
|
||||
@property (nonatomic, strong) IBOutlet ContactsTableViewController* tableController;
|
||||
@property (nonatomic, strong) IBOutlet UITableView *tableView;
|
||||
@property (nonatomic, strong) IBOutlet UINavigationController* sysViewController;
|
||||
@property (strong, nonatomic) IBOutlet UIView *toolBar;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* allButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* linphoneButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *backButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *addButton;
|
||||
@property (strong, nonatomic) IBOutlet UISearchBar *searchBar;
|
||||
|
||||
- (IBAction)onAllClick:(id)event;
|
||||
- (IBAction)onLinphoneClick:(id)event;
|
||||
|
|
|
|||
|
|
@ -41,11 +41,10 @@ static NSString* sNameOrEmailFilter;
|
|||
|
||||
+ (void)setAddAddress:(NSString*)address {
|
||||
if(sAddAddress != nil) {
|
||||
[sAddAddress release];
|
||||
sAddAddress= nil;
|
||||
}
|
||||
if(address != nil) {
|
||||
sAddAddress = [address retain];
|
||||
sAddAddress = address;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -54,8 +53,7 @@ static NSString* sNameOrEmailFilter;
|
|||
}
|
||||
|
||||
+ (void)setSipFilter:(NSString*)domain {
|
||||
[sSipFilter release];
|
||||
sSipFilter = [domain retain];
|
||||
sSipFilter = domain;
|
||||
}
|
||||
|
||||
+ (NSString*)getSipFilter {
|
||||
|
|
@ -71,8 +69,7 @@ static NSString* sNameOrEmailFilter;
|
|||
}
|
||||
|
||||
+ (void)setNameOrEmailFilter:(NSString*)fuzzyName {
|
||||
[sNameOrEmailFilter release];
|
||||
sNameOrEmailFilter = [fuzzyName retain];
|
||||
sNameOrEmailFilter = fuzzyName;
|
||||
}
|
||||
|
||||
+ (NSString*)getNameOrEmailFilter {
|
||||
|
|
@ -109,18 +106,6 @@ typedef enum _HistoryView {
|
|||
return [super initWithNibName:@"ContactsViewController" bundle:[NSBundle mainBundle]];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[tableController release];
|
||||
[tableView release];
|
||||
|
||||
[allButton release];
|
||||
[linphoneButton release];
|
||||
[backButton release];
|
||||
[addButton release];
|
||||
|
||||
[_searchBar release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
#pragma mark - UICompositeViewDelegate Functions
|
||||
|
||||
|
|
@ -181,8 +166,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
} else if( !use_system && !self.tableController ){
|
||||
|
||||
|
||||
self.tableController = [[[ContactsTableViewController alloc] init] autorelease];
|
||||
self.tableView = [[[UITableView alloc] init] autorelease];
|
||||
self.tableController = [[ContactsTableViewController alloc] init];
|
||||
self.tableView = [[UITableView alloc] init];
|
||||
|
||||
self.tableController.view = self.tableView;
|
||||
|
||||
|
|
@ -213,7 +198,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
[[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]];
|
||||
}
|
||||
}
|
||||
|
|
@ -356,13 +340,12 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
CFTypeRef multiValue = ABRecordCopyValue(person, property);
|
||||
CFIndex valueIdx = ABMultiValueGetIndexForIdentifier(multiValue,identifier);
|
||||
NSString *phoneNumber = (NSString *)ABMultiValueCopyValueAtIndex(multiValue, valueIdx);
|
||||
NSString *phoneNumber = (NSString *)CFBridgingRelease(ABMultiValueCopyValueAtIndex(multiValue, valueIdx));
|
||||
// Go to dialer view
|
||||
DialerViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController);
|
||||
if(controller != nil) {
|
||||
[controller call:phoneNumber displayName:[(NSString*)ABRecordCopyCompositeName(person) autorelease]];
|
||||
[controller call:phoneNumber displayName:(NSString*)CFBridgingRelease(ABRecordCopyCompositeName(person))];
|
||||
}
|
||||
[phoneNumber release];
|
||||
CFRelease(multiValue);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,29 +36,29 @@
|
|||
|
||||
@property (nonatomic, assign) BOOL transferMode;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITextField* addressField;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* addContactButton;
|
||||
@property (nonatomic, retain) IBOutlet UICallButton* callButton;
|
||||
@property (nonatomic, retain) IBOutlet UICallButton* addCallButton;
|
||||
@property (nonatomic, retain) IBOutlet UITransferButton* transferButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* backButton;
|
||||
@property (nonatomic, retain) IBOutlet UIEraseButton* eraseButton;
|
||||
@property (nonatomic, strong) IBOutlet UITextField* addressField;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* addContactButton;
|
||||
@property (nonatomic, strong) IBOutlet UICallButton* callButton;
|
||||
@property (nonatomic, strong) IBOutlet UICallButton* addCallButton;
|
||||
@property (nonatomic, strong) IBOutlet UITransferButton* transferButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* backButton;
|
||||
@property (nonatomic, strong) IBOutlet UIEraseButton* eraseButton;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* oneButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* twoButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* threeButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* fourButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* fiveButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* sixButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* sevenButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* eightButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* nineButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* starButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* zeroButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* sharpButton;
|
||||
@property (nonatomic, retain) IBOutlet UIView* backgroundView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* videoPreview;
|
||||
@property (nonatomic, retain) IBOutlet UICamSwitch* videoCameraSwitch;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* oneButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* twoButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* threeButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* fourButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* fiveButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* sixButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* sevenButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* eightButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* nineButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* starButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* zeroButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* sharpButton;
|
||||
@property (nonatomic, strong) IBOutlet UIView* backgroundView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* videoPreview;
|
||||
@property (nonatomic, strong) IBOutlet UICamSwitch* videoCameraSwitch;
|
||||
|
||||
- (IBAction)onAddContactClick: (id) event;
|
||||
- (IBAction)onBackClick: (id) event;
|
||||
|
|
|
|||
|
|
@ -70,34 +70,12 @@
|
|||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[addressField release];
|
||||
[addContactButton release];
|
||||
[backButton release];
|
||||
[eraseButton release];
|
||||
[callButton release];
|
||||
[addCallButton release];
|
||||
[transferButton release];
|
||||
|
||||
[oneButton release];
|
||||
[twoButton release];
|
||||
[threeButton release];
|
||||
[fourButton release];
|
||||
[fiveButton release];
|
||||
[sixButton release];
|
||||
[sevenButton release];
|
||||
[eightButton release];
|
||||
[nineButton release];
|
||||
[starButton release];
|
||||
[zeroButton release];
|
||||
[sharpButton release];
|
||||
|
||||
[videoPreview release];
|
||||
[videoCameraSwitch release];
|
||||
|
||||
// Remove all observers
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -182,7 +160,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
initWithString:NSLocalizedString(@"Enter an address", @"Enter an address")
|
||||
attributes:@{NSForegroundColorAttributeName: color}];
|
||||
addressField.attributedPlaceholder = placeHolderString;
|
||||
[placeHolderString release];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -312,7 +289,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
self.modalPresentationStyle = UIModalPresentationPageSheet;
|
||||
[self.view.window.rootViewController presentViewController:controller animated:TRUE completion:^{}];
|
||||
[controller release];
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -322,7 +298,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
cancelButtonTitle:NSLocalizedString(@"OK", nil)
|
||||
otherButtonTitles: nil];
|
||||
[alert show];
|
||||
[alert release];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -354,7 +329,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}];
|
||||
|
||||
[alertView show];
|
||||
[alertView release];
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@
|
|||
- (IBAction)onLoginClick:(id)sender;
|
||||
- (IBAction)onSiteClick:(id)sender;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* loginButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* siteButton;
|
||||
@property (nonatomic, retain) IBOutlet UITextField* usernameField;
|
||||
@property (nonatomic, retain) IBOutlet UITextField* passwordField;
|
||||
@property (nonatomic, retain) IBOutlet UIView* waitView;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* loginButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* siteButton;
|
||||
@property (nonatomic, strong) IBOutlet UITextField* usernameField;
|
||||
@property (nonatomic, strong) IBOutlet UITextField* passwordField;
|
||||
@property (nonatomic, strong) IBOutlet UIView* waitView;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -37,16 +37,10 @@
|
|||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[loginButton release];
|
||||
[siteButton release];
|
||||
[usernameField release];
|
||||
[passwordField release];
|
||||
[waitView release];
|
||||
|
||||
// Remove all observer
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -174,7 +168,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
} else {
|
||||
linphone_core_clear_all_auth_info([LinphoneManager getLc]);
|
||||
linphone_core_clear_proxy_config([LinphoneManager getLc]);
|
||||
|
|
|
|||
|
|
@ -29,25 +29,26 @@
|
|||
LinphoneCallLog *callLog;
|
||||
NSDateFormatter *dateFormatter;
|
||||
}
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *avatarImage;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *addressLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *dateLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *dateHeaderLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *durationLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *durationHeaderLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *typeLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *typeHeaderLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *plainAddressLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *plainAddressHeaderLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *callButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *messageButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *addContactButton;
|
||||
@property (nonatomic, assign) NSString *callLogId;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView *avatarImage;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *addressLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *dateLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *dateHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *durationLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *durationHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *typeLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *typeHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *plainAddressLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *plainAddressHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *callButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *messageButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *addContactButton;
|
||||
@property (nonatomic, copy, setter=setCallLogId:) NSString *callLogId;
|
||||
|
||||
- (IBAction)onBackClick:(id)event;
|
||||
- (IBAction)onContactClick:(id)event;
|
||||
- (IBAction)onAddContactClick:(id)event;
|
||||
- (IBAction)onCallClick:(id)event;
|
||||
- (IBAction)onMessageClick:(id)event;
|
||||
- (void)setCallLogId:(NSString *)acallLogId;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
#import "FastAddressBook.h"
|
||||
#import "Utils.h"
|
||||
|
||||
@implementation HistoryDetailsViewController
|
||||
@implementation HistoryDetailsViewController {
|
||||
|
||||
}
|
||||
|
||||
@synthesize callLogId;
|
||||
@synthesize avatarImage;
|
||||
|
|
@ -56,24 +58,8 @@
|
|||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[dateFormatter release];
|
||||
[callLogId release];
|
||||
|
||||
[avatarImage release];
|
||||
[addressLabel release];
|
||||
[dateLabel release];
|
||||
[dateHeaderLabel release];
|
||||
[durationLabel release];
|
||||
[durationHeaderLabel release];
|
||||
[typeLabel release];
|
||||
[typeHeaderLabel release];
|
||||
[plainAddressLabel release];
|
||||
[plainAddressHeaderLabel release];
|
||||
[callButton release];
|
||||
[messageButton release];
|
||||
[addContactButton release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -52,10 +52,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[callLogs release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
|
@ -138,9 +134,9 @@
|
|||
static NSString *kCellId = @"UIHistoryCell";
|
||||
UIHistoryCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
|
||||
if (cell == nil) {
|
||||
cell = [[[UIHistoryCell alloc] initWithIdentifier:kCellId] autorelease];
|
||||
cell = [[UIHistoryCell alloc] initWithIdentifier:kCellId];
|
||||
// Background View
|
||||
UACellBackgroundView *selectedBackgroundView = [[[UACellBackgroundView alloc] initWithFrame:CGRectZero] autorelease];
|
||||
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
|
||||
cell.selectedBackgroundView = selectedBackgroundView;
|
||||
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@
|
|||
@interface HistoryViewController : UIViewController<UICompositeViewDelegate> {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet HistoryTableViewController* tableController;
|
||||
@property (nonatomic, retain) IBOutlet UITableView *tableView;
|
||||
@property (nonatomic, strong) IBOutlet HistoryTableViewController* tableController;
|
||||
@property (nonatomic, strong) IBOutlet UITableView *tableView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* allButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* missedButton;
|
||||
@property (nonatomic, retain) IBOutlet UIToggleButton* editButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* deleteButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* allButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* missedButton;
|
||||
@property (nonatomic, strong) IBOutlet UIToggleButton* editButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* deleteButton;
|
||||
|
||||
- (IBAction)onAllClick:(id) event;
|
||||
- (IBAction)onMissedClick:(id) event;
|
||||
|
|
|
|||
|
|
@ -42,16 +42,6 @@ typedef enum _HistoryView {
|
|||
return [super initWithNibName:@"HistoryViewController" bundle:[NSBundle mainBundle]];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[tableController release];
|
||||
[tableView release];
|
||||
|
||||
[allButton release];
|
||||
[missedButton release];
|
||||
[editButton release];
|
||||
[deleteButton release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UICompositeViewDelegate Functions
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
UIImagePickerController *pickerController;
|
||||
}
|
||||
|
||||
@property(nonatomic, retain) id<ImagePickerDelegate> imagePickerDelegate;
|
||||
@property(nonatomic, strong) id<ImagePickerDelegate> imagePickerDelegate;
|
||||
@property(nonatomic) UIImagePickerControllerSourceType sourceType;
|
||||
@property(nonatomic,copy) NSArray *mediaTypes;
|
||||
@property(nonatomic) BOOL allowsEditing;
|
||||
|
|
|
|||
|
|
@ -44,12 +44,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[pickerController release];
|
||||
[popoverController release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UICompositeViewDelegate Functions
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
- (void)cancel;
|
||||
|
||||
@property (nonatomic, retain) id userInfo;
|
||||
@property (nonatomic, strong) id userInfo;
|
||||
|
||||
@property (nonatomic, readonly) BOOL upload;
|
||||
@property (nonatomic, readonly) NSMutableData* data;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
if(imgs != nil) {
|
||||
imgs.userInfo = auserInfo;
|
||||
imgs->upload = TRUE;
|
||||
imgs->delegate = [delegate retain];
|
||||
imgs->delegate = delegate;
|
||||
imgs->data = [[NSMutableData alloc] init];
|
||||
if(delegate) {
|
||||
[delegate imageSharingProgress:imgs progress:0];
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
if(imgs != nil) {
|
||||
imgs.userInfo = auserInfo;
|
||||
imgs->upload = FALSE;
|
||||
imgs->delegate = [delegate retain];
|
||||
imgs->delegate = delegate;
|
||||
imgs->data = [[NSMutableData alloc] init];
|
||||
if(delegate) {
|
||||
[delegate imageSharingProgress:imgs progress:0];
|
||||
|
|
@ -60,13 +60,6 @@
|
|||
return imgs;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[connection release];
|
||||
[data release];
|
||||
[delegate release];
|
||||
[userInfo release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
|
@ -95,7 +88,7 @@
|
|||
LOGI(@"downloading [%@]", [url absoluteString]);
|
||||
|
||||
// setting up the request object now
|
||||
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
|
||||
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
|
||||
[request setURL:url];
|
||||
[request setHTTPMethod:@"POST"];
|
||||
|
||||
|
|
@ -133,7 +126,6 @@
|
|||
if(delegate) {
|
||||
[delegate imageSharingError:self error:error];
|
||||
}
|
||||
[self release];
|
||||
}
|
||||
|
||||
- (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite {
|
||||
|
|
@ -173,7 +165,6 @@
|
|||
if(delegate) {
|
||||
[delegate imageSharingUploadDone:self url:[NSURL URLWithString:imageRemoteUrl]];
|
||||
}
|
||||
[imageRemoteUrl release];
|
||||
} else {
|
||||
UIImage* image = [UIImage imageWithData:data];
|
||||
LOGI(@"File downloaded");
|
||||
|
|
@ -181,7 +172,6 @@
|
|||
[delegate imageSharingDownloadDone:self image:image];
|
||||
}
|
||||
}
|
||||
[self release];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
@interface UIImageScrollView : UIScrollView<UIScrollViewDelegate>
|
||||
|
||||
@property (nonatomic, retain) UIImage *image;
|
||||
@property (nonatomic, strong) UIImage *image;
|
||||
@property (readonly) IBOutlet UIImageView *imageView;
|
||||
|
||||
@end
|
||||
|
|
@ -32,9 +32,9 @@
|
|||
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIImageScrollView *scrollView;
|
||||
@property (nonatomic, retain) UIImage *image;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *backButton;
|
||||
@property (nonatomic, strong) IBOutlet UIImageScrollView *scrollView;
|
||||
@property (nonatomic, strong) UIImage *image;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *backButton;
|
||||
|
||||
- (IBAction)onBackClick:(id)sender;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,12 +58,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[image release];
|
||||
[imageView dealloc];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
|
@ -132,12 +126,6 @@
|
|||
return [super initWithNibName:@"ImageViewController" bundle:[NSBundle mainBundle]];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[scrollView release];
|
||||
[backButton release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UICompositeViewDelegate Functions
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@
|
|||
|
||||
@interface InAppProductsCell : UITableViewCell {
|
||||
}
|
||||
@property (retain, nonatomic) IBOutlet UILabel *ptitle;
|
||||
@property (retain, nonatomic) IBOutlet UILabel *pdescription;
|
||||
@property (retain, nonatomic) IBOutlet UILabel *pprice;
|
||||
@property (retain, nonatomic) IBOutlet UISwitch *ppurchased;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *ptitle;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *pdescription;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *pprice;
|
||||
@property (strong, nonatomic) IBOutlet UISwitch *ppurchased;
|
||||
@property (nonatomic) BOOL isMaximized;
|
||||
@property (retain, nonatomic) NSString *productID;
|
||||
@property (strong, nonatomic) NSString *productID;
|
||||
|
||||
- (id)initWithIdentifier:(NSString*)identifier maximized:(bool)maximized;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,13 +48,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[_ptitle release];
|
||||
[_pdescription release];
|
||||
[_pprice release];
|
||||
[_ppurchased release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *)description {
|
||||
return [NSString stringWithFormat:@"%@ (%@): %@ (%@)", _ptitle.text, _pprice.text, _pdescription.text, _isMaximized ? @"maximized":@"minimized"];
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ typedef NSString* IAPPurchaseNotificationStatus;
|
|||
}
|
||||
|
||||
|
||||
@property (nonatomic, retain) IAPPurchaseNotificationStatus status;
|
||||
@property (nonatomic, strong) IAPPurchaseNotificationStatus status;
|
||||
@property (nonatomic, strong) NSMutableArray *productsAvailable;
|
||||
@property (nonatomic, strong) NSMutableArray *productsIDPurchased;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@
|
|||
#import "InAppProductsViewController.h"
|
||||
|
||||
@interface InAppProductsManager()
|
||||
@property (retain, nonatomic) NSDate *expirationDate;
|
||||
@property (retain, nonatomic) NSDictionary *accountCreationData;
|
||||
@property (strong, nonatomic) NSDate *expirationDate;
|
||||
@property (strong, nonatomic) NSDictionary *accountCreationData;
|
||||
// needed because request:didFailWithError method is already used by SKProductsRequestDelegate...
|
||||
@property (nonatomic, retain) InAppProductsXMLRPCDelegate *xmlrpc;
|
||||
@property (nonatomic, strong) InAppProductsXMLRPCDelegate *xmlrpc;
|
||||
@end
|
||||
|
||||
@implementation InAppProductsManager
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
static NSString *kCellId = @"InAppProductsCell";
|
||||
InAppProductsCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
|
||||
if (cell == nil) {
|
||||
cell = [[[InAppProductsCell alloc] initWithIdentifier:kCellId maximized:(currentExpanded == indexPath.row)] autorelease];
|
||||
cell = [[InAppProductsCell alloc] initWithIdentifier:kCellId maximized:(currentExpanded == indexPath.row)];
|
||||
}
|
||||
SKProduct *prod = [[[[LinphoneManager instance] iapManager] productsAvailable] objectAtIndex:indexPath.row];
|
||||
[cell fillFromProduct:prod];
|
||||
|
|
@ -65,7 +65,6 @@
|
|||
|
||||
[alert addCancelButtonWithTitle:NSLocalizedString(@"OK", nil) block:nil];
|
||||
[alert show];
|
||||
[alert release];
|
||||
} else {
|
||||
//try to purchase item, and if successfull change the switch
|
||||
[[[LinphoneManager instance] iapManager] purchaseWitID: cell.productID];
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
@interface InAppProductsViewController : UIViewController<UICompositeViewDelegate> {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet InAppProductsTableViewController* tableController;
|
||||
@property (retain, nonatomic) IBOutlet UIView *waitView;
|
||||
@property (nonatomic, strong) IBOutlet InAppProductsTableViewController* tableController;
|
||||
@property (strong, nonatomic) IBOutlet UIView *waitView;
|
||||
- (IBAction)onRestoreClicked:(UIButton *)sender;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -21,10 +21,7 @@
|
|||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[_tableController release];
|
||||
|
||||
[_waitView release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
|
|
|||
|
|
@ -62,9 +62,6 @@ enum TableSection {
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
||||
|
|
@ -133,7 +130,7 @@ enum TableSection {
|
|||
- (void)removeCallData:(LinphoneCall*) call {
|
||||
// Remove data associated with the call
|
||||
if(call != NULL) {
|
||||
LinphoneCallAppData* appData = (LinphoneCallAppData*) linphone_call_get_user_pointer(call);
|
||||
LinphoneCallAppData* appData = (__bridge LinphoneCallAppData*) linphone_call_get_user_pointer(call);
|
||||
if(appData != NULL) {
|
||||
[appData->userInfos removeObjectForKey:kLinphoneInCallCellData];
|
||||
}
|
||||
|
|
@ -144,11 +141,11 @@ enum TableSection {
|
|||
// Handle data associated with the call
|
||||
UICallCellData * data = nil;
|
||||
if(call != NULL) {
|
||||
LinphoneCallAppData* appData = (LinphoneCallAppData*) linphone_call_get_user_pointer(call);
|
||||
LinphoneCallAppData* appData = (__bridge LinphoneCallAppData*) linphone_call_get_user_pointer(call);
|
||||
if(appData != NULL) {
|
||||
data = [appData->userInfos objectForKey:kLinphoneInCallCellData];
|
||||
if(data == nil) {
|
||||
data = [[[UICallCellData alloc] init:call minimized:minimized] autorelease];
|
||||
data = [[UICallCellData alloc] init:call minimized:minimized];
|
||||
[appData->userInfos setObject:data forKey:kLinphoneInCallCellData];
|
||||
}
|
||||
}
|
||||
|
|
@ -160,7 +157,7 @@ enum TableSection {
|
|||
// Handle data associated with the call
|
||||
UICallCellData * data = nil;
|
||||
if(call != NULL) {
|
||||
LinphoneCallAppData* appData = (LinphoneCallAppData*) linphone_call_get_user_pointer(call);
|
||||
LinphoneCallAppData* appData = (__bridge LinphoneCallAppData*) linphone_call_get_user_pointer(call);
|
||||
if(appData != NULL) {
|
||||
data = [appData->userInfos objectForKey:kLinphoneInCallCellData];
|
||||
}
|
||||
|
|
@ -214,7 +211,7 @@ enum TableSection {
|
|||
static NSString *kCellId = @"UICallCell";
|
||||
UICallCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
|
||||
if (cell == nil) {
|
||||
cell = [[[UICallCell alloc] initWithIdentifier:kCellId] autorelease];
|
||||
cell = [[UICallCell alloc] initWithIdentifier:kCellId];
|
||||
}
|
||||
|
||||
bool inConference = indexPath.section == ConferenceSection;
|
||||
|
|
@ -275,24 +272,23 @@ enum TableSection {
|
|||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
if(section == CallSection) {
|
||||
return [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
|
||||
return [[UIView alloc] initWithFrame:CGRectZero];
|
||||
} else if(section == ConferenceSection) {
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
if(linphone_core_get_conference_size(lc) > 0){
|
||||
UIConferenceHeader *headerController = [[UIConferenceHeader alloc] init];
|
||||
[headerController update];
|
||||
UIView *headerView = [headerController view];
|
||||
[headerController release];
|
||||
return headerView;
|
||||
} else {
|
||||
return [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
|
||||
return [[UIView alloc] initWithFrame:CGRectZero];
|
||||
}
|
||||
}
|
||||
return [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
|
||||
return [[UIView alloc] initWithFrame:CGRectZero];
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
|
||||
return [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
|
||||
return [[UIView alloc] initWithFrame:CGRectZero];
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
||||
|
|
|
|||
|
|
@ -35,16 +35,16 @@
|
|||
VideoZoomHandler* videoZoomHandler;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet InCallTableViewController* callTableController;
|
||||
@property (nonatomic, retain) IBOutlet UITableView* callTableView;
|
||||
@property (nonatomic, strong) IBOutlet InCallTableViewController* callTableController;
|
||||
@property (nonatomic, strong) IBOutlet UITableView* callTableView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* videoGroup;
|
||||
@property (nonatomic, retain) IBOutlet UIView* videoView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* videoGroup;
|
||||
@property (nonatomic, strong) IBOutlet UIView* videoView;
|
||||
#ifdef TEST_VIDEO_VIEW_CHANGE
|
||||
@property (nonatomic, retain) IBOutlet UIView* testVideoView;
|
||||
#endif
|
||||
@property (nonatomic, retain) IBOutlet UIView* videoPreview;
|
||||
@property (nonatomic, retain) IBOutlet UICamSwitch* videoCameraSwitch;
|
||||
@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* videoWaitingForFirstImage;
|
||||
@property (nonatomic, strong) IBOutlet UIView* videoPreview;
|
||||
@property (nonatomic, strong) IBOutlet UICamSwitch* videoCameraSwitch;
|
||||
@property (nonatomic, strong) IBOutlet UIActivityIndicatorView* videoWaitingForFirstImage;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -65,28 +65,18 @@ const NSInteger SECURE_BUTTON_TAG=5;
|
|||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[callTableController release];
|
||||
[callTableView release];
|
||||
|
||||
[videoGroup release];
|
||||
[videoView release];
|
||||
[videoPreview release];
|
||||
#ifdef TEST_VIDEO_VIEW_CHANGE
|
||||
[testVideoView release];
|
||||
#endif
|
||||
[videoCameraSwitch release];
|
||||
|
||||
[videoWaitingForFirstImage release];
|
||||
|
||||
[videoZoomHandler release];
|
||||
|
||||
[[PhoneMainView instance].view removeGestureRecognizer:singleFingerTap];
|
||||
[singleFingerTap release];
|
||||
|
||||
// Remove all observer
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -237,7 +227,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
} else {
|
||||
[self displayTableCall:animated];
|
||||
const LinphoneCallParams* param = linphone_call_get_current_params(call);
|
||||
const LinphoneCallAppData* callAppData = linphone_call_get_user_pointer(call);
|
||||
const LinphoneCallAppData* callAppData = (__bridge const LinphoneCallAppData *)(linphone_call_get_user_pointer(call));
|
||||
if(state == LinphoneCallStreamsRunning
|
||||
&& callAppData->videoRequested
|
||||
&& linphone_call_params_low_bandwidth_enabled(param)) {
|
||||
|
|
@ -248,7 +238,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
cancelButtonTitle:NSLocalizedString(@"Continue", nil)
|
||||
otherButtonTitles:nil];
|
||||
[alert show];
|
||||
[alert release];
|
||||
callAppData->videoRequested=FALSE; /*reset field*/
|
||||
}
|
||||
}
|
||||
|
|
@ -400,7 +389,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
LinphoneCall *call = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
//linphone_call_params_get_used_video_codec return 0 if no video stream enabled
|
||||
if (call != NULL && linphone_call_params_get_used_video_codec(linphone_call_get_current_params(call))) {
|
||||
linphone_call_set_next_video_frame_decoded_callback(call, hideSpinner, self);
|
||||
linphone_call_set_next_video_frame_decoded_callback(call, hideSpinner, (__bridge void *)(self));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -456,7 +445,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
|
||||
static void hideSpinner(LinphoneCall* call, void* user_data) {
|
||||
InCallViewController* thiz = (InCallViewController*) user_data;
|
||||
InCallViewController* thiz = (__bridge InCallViewController*) user_data;
|
||||
[thiz hideSpinnerIndicator:call];
|
||||
}
|
||||
|
||||
|
|
@ -477,12 +466,12 @@ static void hideSpinner(LinphoneCall* call, void* user_data) {
|
|||
return;
|
||||
|
||||
const char* lUserNameChars = linphone_address_get_username(linphone_call_get_remote_address(call));
|
||||
NSString* lUserName = lUserNameChars?[[[NSString alloc] initWithUTF8String:lUserNameChars] autorelease]:NSLocalizedString(@"Unknown",nil);
|
||||
NSString* lUserName = lUserNameChars?[[NSString alloc] initWithUTF8String:lUserNameChars]:NSLocalizedString(@"Unknown",nil);
|
||||
const char* lDisplayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(call));
|
||||
NSString* lDisplayName = [lDisplayNameChars?[[NSString alloc] initWithUTF8String:lDisplayNameChars]:@"" autorelease];
|
||||
NSString* lDisplayName = lDisplayNameChars?[[NSString alloc] initWithUTF8String:lDisplayNameChars]:@"";
|
||||
|
||||
NSString* title = [NSString stringWithFormat : NSLocalizedString(@"'%@' would like to enable video",nil), ([lDisplayName length] > 0)?lDisplayName:lUserName];
|
||||
DTActionSheet *sheet = [[[DTActionSheet alloc] initWithTitle:title] autorelease];
|
||||
DTActionSheet *sheet = [[DTActionSheet alloc] initWithTitle:title];
|
||||
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:30 target:self selector:@selector(dismissVideoActionSheet:) userInfo:sheet repeats:NO];
|
||||
[sheet addButtonWithTitle:NSLocalizedString(@"Accept", nil) block:^() {
|
||||
LOGI(@"User accept video proposal");
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@
|
|||
@interface IncomingCallViewController : TPMultiLayoutViewController <UICompositeViewDelegate> {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel* addressLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* avatarImage;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* addressLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* avatarImage;
|
||||
@property (nonatomic, assign) LinphoneCall* call;
|
||||
@property (nonatomic, retain) id<IncomingCallViewDelegate> delegate;
|
||||
@property (nonatomic, strong) id<IncomingCallViewDelegate> delegate;
|
||||
|
||||
- (IBAction)onAcceptClick:(id) event;
|
||||
- (IBAction)onDeclineClick:(id) event;
|
||||
|
|
|
|||
|
|
@ -39,10 +39,6 @@
|
|||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[avatarImage release];
|
||||
[addressLabel release];
|
||||
[delegate release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,9 +44,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
|
@ -116,14 +113,14 @@
|
|||
|
||||
- (UIUserNotificationCategory*)getMessageNotificationCategory {
|
||||
|
||||
UIMutableUserNotificationAction* reply = [[[UIMutableUserNotificationAction alloc] init] autorelease];
|
||||
UIMutableUserNotificationAction* reply = [[UIMutableUserNotificationAction alloc] init];
|
||||
reply.identifier = @"reply";
|
||||
reply.title = NSLocalizedString(@"Reply", nil);
|
||||
reply.activationMode = UIUserNotificationActivationModeForeground;
|
||||
reply.destructive = NO;
|
||||
reply.authenticationRequired = YES;
|
||||
|
||||
UIMutableUserNotificationAction* mark_read = [[[UIMutableUserNotificationAction alloc] init] autorelease];
|
||||
UIMutableUserNotificationAction* mark_read = [[UIMutableUserNotificationAction alloc] init];
|
||||
mark_read.identifier = @"mark_read";
|
||||
mark_read.title = NSLocalizedString(@"Mark Read", nil);
|
||||
mark_read.activationMode = UIUserNotificationActivationModeBackground;
|
||||
|
|
@ -132,7 +129,7 @@
|
|||
|
||||
NSArray* localRingActions = @[mark_read, reply];
|
||||
|
||||
UIMutableUserNotificationCategory* localRingNotifAction = [[[UIMutableUserNotificationCategory alloc] init] autorelease];
|
||||
UIMutableUserNotificationCategory* localRingNotifAction = [[UIMutableUserNotificationCategory alloc] init];
|
||||
localRingNotifAction.identifier = @"incoming_msg";
|
||||
[localRingNotifAction setActions:localRingActions forContext:UIUserNotificationActionContextDefault];
|
||||
[localRingNotifAction setActions:localRingActions forContext:UIUserNotificationActionContextMinimal];
|
||||
|
|
@ -141,14 +138,14 @@
|
|||
}
|
||||
|
||||
- (UIUserNotificationCategory*)getCallNotificationCategory {
|
||||
UIMutableUserNotificationAction* answer = [[[UIMutableUserNotificationAction alloc] init] autorelease];
|
||||
UIMutableUserNotificationAction* answer = [[UIMutableUserNotificationAction alloc] init];
|
||||
answer.identifier = @"answer";
|
||||
answer.title = NSLocalizedString(@"Answer", nil);
|
||||
answer.activationMode = UIUserNotificationActivationModeForeground;
|
||||
answer.destructive = NO;
|
||||
answer.authenticationRequired = YES;
|
||||
|
||||
UIMutableUserNotificationAction* decline = [[[UIMutableUserNotificationAction alloc] init] autorelease];
|
||||
UIMutableUserNotificationAction* decline = [[UIMutableUserNotificationAction alloc] init];
|
||||
decline.identifier = @"decline";
|
||||
decline.title = NSLocalizedString(@"Decline", nil);
|
||||
decline.activationMode = UIUserNotificationActivationModeBackground;
|
||||
|
|
@ -158,7 +155,7 @@
|
|||
|
||||
NSArray* localRingActions = @[decline, answer];
|
||||
|
||||
UIMutableUserNotificationCategory* localRingNotifAction = [[[UIMutableUserNotificationCategory alloc] init] autorelease];
|
||||
UIMutableUserNotificationCategory* localRingNotifAction = [[UIMutableUserNotificationCategory alloc] init];
|
||||
localRingNotifAction.identifier = @"incoming_call";
|
||||
[localRingNotifAction setActions:localRingActions forContext:UIUserNotificationActionContextDefault];
|
||||
[localRingNotifAction setActions:localRingActions forContext:UIUserNotificationActionContextMinimal];
|
||||
|
|
@ -247,7 +244,6 @@
|
|||
otherButtonTitles:NSLocalizedString(@"Yes",nil),nil];
|
||||
confirmation.tag = 1;
|
||||
[confirmation show];
|
||||
[confirmation release];
|
||||
} else {
|
||||
if([[url scheme] isEqualToString:@"sip"]) {
|
||||
// remove "sip://" from the URI, and do it correctly by taking resourceSpecifier and removing leading and trailing "/"
|
||||
|
|
@ -462,7 +458,6 @@
|
|||
cancelButtonTitle:NSLocalizedString(@"OK",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
[[PhoneMainView instance] startUp];
|
||||
}
|
||||
if (state == LinphoneConfiguringFailed) {
|
||||
|
|
@ -476,7 +471,6 @@
|
|||
cancelButtonTitle:NSLocalizedString(@"OK",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -492,7 +486,6 @@
|
|||
[_waitingIndicator addSubview:progress];
|
||||
}
|
||||
[progress startAnimating];
|
||||
[progress release];
|
||||
[_waitingIndicator show];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,11 +35,6 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[dict release];
|
||||
[changedDict release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)transformKeysToLinphoneCore {
|
||||
//LinphoneCore *lc=[LinphoneManager getLc];
|
||||
|
|
@ -50,7 +45,6 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
id obj=Nil;
|
||||
if (value) obj=[[NSString alloc] initWithCString:value encoding:[NSString defaultCStringEncoding] ];
|
||||
[self setObject:obj forKey:key];
|
||||
[obj release];
|
||||
}
|
||||
|
||||
- (NSString*)stringForKey:(NSString*) key {
|
||||
|
|
@ -262,7 +256,6 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
}
|
||||
}
|
||||
|
||||
[changedDict release];
|
||||
changedDict = [[NSMutableDictionary alloc] init];
|
||||
|
||||
// Post event
|
||||
|
|
@ -290,7 +283,6 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
cancelButtonTitle:NSLocalizedString(@"OK", nil)
|
||||
otherButtonTitles: nil];
|
||||
[alertview show];
|
||||
[alertview release];
|
||||
}
|
||||
|
||||
+ (BOOL)hasSipPrefix:(NSString*)str {
|
||||
|
|
@ -739,7 +731,6 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
[[LinphoneManager instance] setTunnelMode:mode];
|
||||
}
|
||||
|
||||
[changedDict release];
|
||||
changedDict = [[NSMutableDictionary alloc] init];
|
||||
|
||||
// Post event
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ typedef struct _LinphoneManagerSounds {
|
|||
+ (void)instanceRelease;
|
||||
#endif
|
||||
+ (LinphoneCore*) getLc;
|
||||
+ (BOOL)isLcReady;
|
||||
+ (BOOL)runningOnIpad;
|
||||
+ (BOOL)isNotIphone3G;
|
||||
+ (NSString *)getPreferenceForCodec: (const char*) name withRate: (int) rate;
|
||||
|
|
@ -183,14 +182,14 @@ typedef struct _LinphoneManagerSounds {
|
|||
- (void)silentPushFailed:(NSTimer*)timer;
|
||||
|
||||
@property (readonly) BOOL isTesting;
|
||||
@property (readonly) FastAddressBook* fastAddressBook;
|
||||
@property (readonly, strong) FastAddressBook* fastAddressBook;
|
||||
@property Connectivity connectivity;
|
||||
@property (readonly) NetworkType network;
|
||||
@property (readonly) const char* frontCamId;
|
||||
@property (readonly) const char* backCamId;
|
||||
@property (retain, nonatomic) NSString* SSID;
|
||||
@property (strong, nonatomic) NSString* SSID;
|
||||
@property (readonly) sqlite3* database;
|
||||
@property (nonatomic, retain) NSData *pushNotificationToken;
|
||||
@property (nonatomic, strong) NSData *pushNotificationToken;
|
||||
@property (readonly) LinphoneManagerSounds sounds;
|
||||
@property (readonly) NSMutableArray *logs;
|
||||
@property (nonatomic, assign) BOOL speakerEnabled;
|
||||
|
|
|
|||
|
|
@ -97,15 +97,11 @@ NSString *const kLinphoneInternalChatDBFilename = @"linphone_chats.db";
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self->userInfos release];
|
||||
[super dealloc];
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@interface LinphoneManager ()
|
||||
@property (retain, nonatomic) AVAudioPlayer* messagePlayer;
|
||||
@property (strong, nonatomic) AVAudioPlayer* messagePlayer;
|
||||
@end
|
||||
|
||||
@implementation LinphoneManager
|
||||
|
|
@ -131,30 +127,30 @@ NSString *const kLinphoneInternalChatDBFilename = @"linphone_chats.db";
|
|||
struct codec_name_pref_table{
|
||||
const char *name;
|
||||
int rate;
|
||||
NSString *prefname;
|
||||
const char *prefname;
|
||||
};
|
||||
|
||||
struct codec_name_pref_table codec_pref_table[]={
|
||||
{ "speex", 8000, @"speex_8k_preference" },
|
||||
{ "speex", 16000, @"speex_16k_preference" },
|
||||
{ "silk", 24000, @"silk_24k_preference" },
|
||||
{ "silk", 16000, @"silk_16k_preference" },
|
||||
{ "amr", 8000, @"amr_preference" },
|
||||
{ "gsm", 8000, @"gsm_preference" },
|
||||
{ "ilbc", 8000, @"ilbc_preference"},
|
||||
{ "pcmu", 8000, @"pcmu_preference"},
|
||||
{ "pcma", 8000, @"pcma_preference"},
|
||||
{ "g722", 8000, @"g722_preference"},
|
||||
{ "g729", 8000, @"g729_preference"},
|
||||
{ "mp4v-es", 90000, @"mp4v-es_preference"},
|
||||
{ "h264", 90000, @"h264_preference"},
|
||||
{ "vp8", 90000, @"vp8_preference"},
|
||||
{ "mpeg4-generic", 16000, @"aaceld_16k_preference"},
|
||||
{ "mpeg4-generic", 22050, @"aaceld_22k_preference"},
|
||||
{ "mpeg4-generic", 32000, @"aaceld_32k_preference"},
|
||||
{ "mpeg4-generic", 44100, @"aaceld_44k_preference"},
|
||||
{ "mpeg4-generic", 48000, @"aaceld_48k_preference"},
|
||||
{ "opus", 48000, @"opus_preference"},
|
||||
{ "speex", 8000, "speex_8k_preference" },
|
||||
{ "speex", 16000, "speex_16k_preference" },
|
||||
{ "silk", 24000, "silk_24k_preference" },
|
||||
{ "silk", 16000, "silk_16k_preference" },
|
||||
{ "amr", 8000, "amr_preference" },
|
||||
{ "gsm", 8000, "gsm_preference" },
|
||||
{ "ilbc", 8000, "ilbc_preference"},
|
||||
{ "pcmu", 8000, "pcmu_preference"},
|
||||
{ "pcma", 8000, "pcma_preference"},
|
||||
{ "g722", 8000, "g722_preference"},
|
||||
{ "g729", 8000, "g729_preference"},
|
||||
{ "mp4v-es", 90000, "mp4v-es_preference"},
|
||||
{ "h264", 90000, "h264_preference"},
|
||||
{ "vp8", 90000, "vp8_preference"},
|
||||
{ "mpeg4-generic", 16000, "aaceld_16k_preference"},
|
||||
{ "mpeg4-generic", 22050, "aaceld_22k_preference"},
|
||||
{ "mpeg4-generic", 32000, "aaceld_32k_preference"},
|
||||
{ "mpeg4-generic", 44100, "aaceld_44k_preference"},
|
||||
{ "mpeg4-generic", 48000, "aaceld_48k_preference"},
|
||||
{ "opus", 48000, "opus_preference"},
|
||||
{ NULL,0,Nil }
|
||||
};
|
||||
|
||||
|
|
@ -162,7 +158,7 @@ struct codec_name_pref_table codec_pref_table[]={
|
|||
int i;
|
||||
for(i=0;codec_pref_table[i].name!=NULL;++i){
|
||||
if (strcasecmp(codec_pref_table[i].name,name)==0 && codec_pref_table[i].rate==rate)
|
||||
return codec_pref_table[i].prefname;
|
||||
return [NSString stringWithUTF8String:codec_pref_table[i].prefname];
|
||||
}
|
||||
return Nil;
|
||||
}
|
||||
|
|
@ -176,11 +172,11 @@ struct codec_name_pref_table codec_pref_table[]={
|
|||
LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS);
|
||||
if( (available == NULL)
|
||||
// these two codecs should not be hidden, even if not supported
|
||||
&& ![codec_pref_table[i].prefname isEqualToString:@"h264_preference"]
|
||||
&& ![codec_pref_table[i].prefname isEqualToString:@"mp4v-es_preference"]
|
||||
&& strcmp(codec_pref_table[i].prefname, "h264_preference") != 0
|
||||
&& strcmp(codec_pref_table[i].prefname, "mp4v-es_preference") != 0
|
||||
)
|
||||
{
|
||||
[set addObject:codec_pref_table[i].prefname];
|
||||
[set addObject:[NSString stringWithUTF8String:codec_pref_table[i].prefname]];
|
||||
}
|
||||
}
|
||||
return set;
|
||||
|
|
@ -217,7 +213,6 @@ struct codec_name_pref_table codec_pref_table[]={
|
|||
|
||||
result = ![platform isEqualToString:@"iPhone1,2"];
|
||||
|
||||
[platform release];
|
||||
done=TRUE;
|
||||
}
|
||||
return result;
|
||||
|
|
@ -232,9 +227,10 @@ struct codec_name_pref_table codec_pref_table[]={
|
|||
}
|
||||
|
||||
+ (LinphoneManager*)instance {
|
||||
if(theLinphoneManager == nil) {
|
||||
theLinphoneManager = [LinphoneManager alloc];
|
||||
[theLinphoneManager init];
|
||||
@synchronized(self){
|
||||
if(theLinphoneManager == nil) {
|
||||
theLinphoneManager = [[LinphoneManager alloc] init];
|
||||
}
|
||||
}
|
||||
return theLinphoneManager;
|
||||
}
|
||||
|
|
@ -242,7 +238,6 @@ struct codec_name_pref_table codec_pref_table[]={
|
|||
#ifdef DEBUG
|
||||
+ (void)instanceRelease {
|
||||
if(theLinphoneManager != nil) {
|
||||
[theLinphoneManager release];
|
||||
theLinphoneManager = nil;
|
||||
}
|
||||
}
|
||||
|
|
@ -262,13 +257,13 @@ struct codec_name_pref_table codec_pref_table[]={
|
|||
- (id)init {
|
||||
if ((self = [super init])) {
|
||||
AudioSessionInitialize(NULL, NULL, NULL, NULL);
|
||||
OSStatus lStatus = AudioSessionAddPropertyListener(kAudioSessionProperty_AudioRouteChange, audioRouteChangeListenerCallback, self);
|
||||
OSStatus lStatus = AudioSessionAddPropertyListener(kAudioSessionProperty_AudioRouteChange, audioRouteChangeListenerCallback, (__bridge void *)(self));
|
||||
if (lStatus) {
|
||||
LOGE(@"cannot register route change handler [%ld]",lStatus);
|
||||
}
|
||||
|
||||
NSString *path = [[NSBundle mainBundle] pathForResource:@"msg" ofType:@"wav"];
|
||||
self.messagePlayer = [[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL URLWithString:path] error:nil] autorelease];
|
||||
self.messagePlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL URLWithString:path] error:nil];
|
||||
|
||||
sounds.vibrate = kSystemSoundID_Vibrate;
|
||||
|
||||
|
|
@ -301,10 +296,8 @@ struct codec_name_pref_table codec_pref_table[]={
|
|||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[fastAddressBook release];
|
||||
[logs release];
|
||||
|
||||
OSStatus lStatus = AudioSessionRemovePropertyListenerWithUserData(kAudioSessionProperty_AudioRouteChange, audioRouteChangeListenerCallback, self);
|
||||
OSStatus lStatus = AudioSessionRemovePropertyListenerWithUserData(kAudioSessionProperty_AudioRouteChange, audioRouteChangeListenerCallback, (__bridge void *)(self));
|
||||
if (lStatus) {
|
||||
LOGE(@"cannot un register route change handler [%ld]", lStatus);
|
||||
}
|
||||
|
|
@ -313,9 +306,6 @@ struct codec_name_pref_table codec_pref_table[]={
|
|||
[[NSNotificationCenter defaultCenter] removeObserver:self forKeyPath:kLinphoneConfiguringStateUpdate];
|
||||
|
||||
|
||||
[photoLibrary release];
|
||||
[pushCallIDs release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)silentPushFailed:(NSTimer*)timer
|
||||
|
|
@ -504,9 +494,6 @@ exit_dbmigration:
|
|||
return theLinphoneCore;
|
||||
}
|
||||
|
||||
+ (BOOL)isLcReady {
|
||||
return theLinphoneCore != nil;
|
||||
}
|
||||
|
||||
#pragma mark Debug functions
|
||||
|
||||
|
|
@ -555,7 +542,6 @@ void linphone_iphone_log_handler(int lev, const char *fmt, va_list args){
|
|||
// });
|
||||
//
|
||||
// [formatedString release];
|
||||
[format release];
|
||||
}
|
||||
|
||||
//Error/warning log handler
|
||||
|
|
@ -588,8 +574,7 @@ static void linphone_iphone_log(struct _LinphoneCore * lc, const char * message)
|
|||
|
||||
static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char * message) {
|
||||
NSString* status = [[NSString alloc] initWithCString:message encoding:[NSString defaultCStringEncoding]];
|
||||
[(LinphoneManager*)linphone_core_get_user_data(lc) displayStatus:status];
|
||||
[status release];
|
||||
[(__bridge LinphoneManager*)linphone_core_get_user_data(lc) displayStatus:status];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -607,10 +592,10 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
- (void)onCall:(LinphoneCall*)call StateChanged:(LinphoneCallState)state withMessage:(const char *)message {
|
||||
|
||||
// Handling wrapper
|
||||
LinphoneCallAppData* data=(LinphoneCallAppData*)linphone_call_get_user_pointer(call);
|
||||
LinphoneCallAppData* data=(__bridge LinphoneCallAppData*)linphone_call_get_user_data(call);
|
||||
if (!data) {
|
||||
data = [[LinphoneCallAppData alloc] init];
|
||||
linphone_call_set_user_pointer(call, data);
|
||||
linphone_call_set_user_data(call, (__bridge_retained void*)data);
|
||||
}
|
||||
|
||||
if (silentPushCompletion) {
|
||||
|
|
@ -663,10 +648,8 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
ms_free(tmp);
|
||||
}
|
||||
linphone_core_decline_call(theLinphoneCore, call,LinphoneReasonBusy);
|
||||
[lCTCallCenter release];
|
||||
return;
|
||||
}
|
||||
[lCTCallCenter release];
|
||||
|
||||
if( [UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
|
||||
|
||||
|
|
@ -743,7 +726,6 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
}
|
||||
[[UIApplication sharedApplication] cancelLocalNotification:data->notification];
|
||||
|
||||
[data->notification release];
|
||||
data->notification = nil;
|
||||
|
||||
if(log == NULL || linphone_call_log_get_status(log) == LinphoneCallMissed) {
|
||||
|
|
@ -753,7 +735,6 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
notification.alertAction = NSLocalizedString(@"Show", nil);
|
||||
notification.userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithUTF8String:linphone_call_log_get_call_id(log)] forKey:@"callLog"];
|
||||
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
|
||||
[notification release];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -761,8 +742,8 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
|
||||
if(state == LinphoneCallReleased) {
|
||||
if(data != NULL) {
|
||||
[data release];
|
||||
linphone_call_set_user_pointer(call, NULL);
|
||||
linphone_call_set_user_data(call, NULL);
|
||||
CFBridgingRelease((__bridge CFTypeRef)(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -789,7 +770,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
}
|
||||
|
||||
static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, LinphoneCallState state,const char* message) {
|
||||
[(LinphoneManager*)linphone_core_get_user_data(lc) onCall:call StateChanged: state withMessage: message];
|
||||
[(__bridge LinphoneManager*)linphone_core_get_user_data(lc) onCall:call StateChanged: state withMessage: message];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -801,7 +782,7 @@ static void linphone_iphone_transfer_state_changed(LinphoneCore* lc, LinphoneCal
|
|||
#pragma mark - Global state change
|
||||
|
||||
static void linphone_iphone_global_state_changed(LinphoneCore *lc, LinphoneGlobalState gstate, const char *message) {
|
||||
[(LinphoneManager*)linphone_core_get_user_data(lc) onGlobalStateChanged:gstate withMessage:message];
|
||||
[(__bridge LinphoneManager*)linphone_core_get_user_data(lc) onGlobalStateChanged:gstate withMessage:message];
|
||||
}
|
||||
|
||||
-(void)onGlobalStateChanged:(LinphoneGlobalState)state withMessage:(const char*)message {
|
||||
|
|
@ -829,7 +810,7 @@ static void linphone_iphone_global_state_changed(LinphoneCore *lc, LinphoneGloba
|
|||
#pragma mark - Configuring status changed
|
||||
|
||||
static void linphone_iphone_configuring_status_changed(LinphoneCore *lc, LinphoneConfiguringState status, const char *message) {
|
||||
[(LinphoneManager*)linphone_core_get_user_data(lc) onConfiguringStatusChanged:status withMessage:message];
|
||||
[(__bridge LinphoneManager*)linphone_core_get_user_data(lc) onConfiguringStatusChanged:status withMessage:message];
|
||||
}
|
||||
|
||||
-(void)onConfiguringStatusChanged:(LinphoneConfiguringState)status withMessage:(const char*)message {
|
||||
|
|
@ -871,7 +852,7 @@ static void linphone_iphone_configuring_status_changed(LinphoneCore *lc, Linphon
|
|||
}
|
||||
|
||||
static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyConfig* cfg, LinphoneRegistrationState state,const char* message) {
|
||||
[(LinphoneManager*)linphone_core_get_user_data(lc) onRegister:lc cfg:cfg state:state message:message];
|
||||
[(__bridge LinphoneManager*)linphone_core_get_user_data(lc) onRegister:lc cfg:cfg state:state message:message];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -913,7 +894,7 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
|
|||
}
|
||||
|
||||
// Create a new notification
|
||||
UILocalNotification* notif = [[[UILocalNotification alloc] init] autorelease];
|
||||
UILocalNotification* notif = [[UILocalNotification alloc] init];
|
||||
if (notif) {
|
||||
notif.repeatInterval = 0;
|
||||
if( [[UIDevice currentDevice].systemVersion floatValue] >= 8){
|
||||
|
|
@ -938,7 +919,7 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
|
|||
}
|
||||
|
||||
static void linphone_iphone_message_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message) {
|
||||
[(LinphoneManager*)linphone_core_get_user_data(lc) onMessageReceived:lc room:room message:message];
|
||||
[(__bridge LinphoneManager*)linphone_core_get_user_data(lc) onMessageReceived:lc room:room message:message];
|
||||
}
|
||||
|
||||
- (void)onNotifyReceived:(LinphoneCore *)lc event:(LinphoneEvent *)lev notifyEvent:(const char *)notified_event content:(const LinphoneContent *)body {
|
||||
|
|
@ -954,7 +935,7 @@ static void linphone_iphone_message_received(LinphoneCore *lc, LinphoneChatRoom
|
|||
}
|
||||
|
||||
static void linphone_iphone_notify_received(LinphoneCore *lc, LinphoneEvent *lev, const char *notified_event, const LinphoneContent *body) {
|
||||
[(LinphoneManager*)linphone_core_get_user_data(lc) onNotifyReceived:lc event:lev notifyEvent:notified_event content:body];
|
||||
[(__bridge LinphoneManager*)linphone_core_get_user_data(lc) onNotifyReceived:lc event:lev notifyEvent:notified_event content:body];
|
||||
}
|
||||
|
||||
#pragma mark - Message composition start
|
||||
|
|
@ -966,7 +947,7 @@ static void linphone_iphone_notify_received(LinphoneCore *lc, LinphoneEvent *lev
|
|||
}
|
||||
|
||||
static void linphone_iphone_is_composing_received(LinphoneCore *lc, LinphoneChatRoom *room){
|
||||
[(LinphoneManager*)linphone_core_get_user_data(lc) onMessageComposeReceived:lc forRoom:room];
|
||||
[(__bridge LinphoneManager*)linphone_core_get_user_data(lc) onMessageComposeReceived:lc forRoom:room];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1169,14 +1150,14 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
// This notification is used to detect SSID change (switch of Wifi network). The ReachabilityCallback is
|
||||
// not triggered when switching between 2 private Wifi...
|
||||
// Since we cannot be sure we were already observer, remove ourself each time... to be improved
|
||||
_SSID = [[LinphoneManager getCurrentWifiSSID] retain];
|
||||
_SSID = [LinphoneManager getCurrentWifiSSID];
|
||||
CFNotificationCenterRemoveObserver(
|
||||
CFNotificationCenterGetDarwinNotifyCenter(),
|
||||
self,
|
||||
(__bridge const void *)(self),
|
||||
CFSTR("com.apple.system.config.network_change"),
|
||||
NULL);
|
||||
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(),
|
||||
self,
|
||||
(__bridge const void *)(self),
|
||||
networkReachabilityNotification,
|
||||
CFSTR("com.apple.system.config.network_change"),
|
||||
NULL,
|
||||
|
|
@ -1217,7 +1198,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
return [number intValue];
|
||||
} else {
|
||||
CTTelephonyNetworkInfo* info = [[CTTelephonyNetworkInfo alloc] init];
|
||||
NSString* currentRadio = [info.currentRadioAccessTechnology autorelease];
|
||||
NSString* currentRadio = info.currentRadioAccessTechnology;
|
||||
if( [currentRadio isEqualToString:CTRadioAccessTechnologyEdge]){
|
||||
return network_2g;
|
||||
} else if ([currentRadio isEqualToString:CTRadioAccessTechnologyLTE]){
|
||||
|
|
@ -1275,10 +1256,11 @@ static LinphoneCoreVTable linphonec_vtable = {
|
|||
|
||||
linphone_core_set_user_agent(theLinphoneCore, [[[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"] stringByAppendingString:@"Iphone"] UTF8String], LINPHONE_IOS_VERSION);
|
||||
|
||||
[_contactSipField release];
|
||||
_contactSipField = [[self lpConfigStringForKey:@"contact_im_type_value" withDefault:@"SIP"] retain];
|
||||
_contactSipField = [self lpConfigStringForKey:@"contact_im_type_value" withDefault:@"SIP"];
|
||||
|
||||
fastAddressBook = [[FastAddressBook alloc] init];
|
||||
if( fastAddressBook == nil ){
|
||||
fastAddressBook = [[FastAddressBook alloc] init];
|
||||
}
|
||||
|
||||
linphone_core_set_root_ca(theLinphoneCore, lRootCa);
|
||||
// Set audio assets
|
||||
|
|
@ -1416,7 +1398,6 @@ static BOOL libStarted = FALSE;
|
|||
cancelButtonTitle:NSLocalizedString(@"Ok",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[error show];
|
||||
[error release];
|
||||
}
|
||||
|
||||
if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
|
||||
|
|
@ -1462,7 +1443,7 @@ static BOOL libStarted = FALSE;
|
|||
|
||||
theLinphoneCore = linphone_core_new_with_config (&linphonec_vtable
|
||||
,configDb
|
||||
,self /* user_data */);
|
||||
,(__bridge void *)(self) /* user_data */);
|
||||
|
||||
|
||||
|
||||
|
|
@ -1536,7 +1517,7 @@ static int comp_call_id(const LinphoneCall* call , const char *callid) {
|
|||
MSList* calls = (MSList*)linphone_core_get_calls(theLinphoneCore);
|
||||
MSList* call = ms_list_find_custom(calls, (MSCompareFunc)comp_call_id, [callid UTF8String]);
|
||||
if (call != NULL) {
|
||||
LinphoneCallAppData* data = linphone_call_get_user_pointer((LinphoneCall*)call->data);
|
||||
LinphoneCallAppData* data = (__bridge LinphoneCallAppData *)(linphone_call_get_user_data((LinphoneCall*)call->data));
|
||||
if ( data->timer )
|
||||
[data->timer invalidate];
|
||||
data->timer = nil;
|
||||
|
|
@ -1623,10 +1604,7 @@ static int comp_call_state_paused (const LinphoneCall* call, const void* param)
|
|||
if ([[UIApplication sharedApplication] setKeepAliveTimeout:600/*(NSTimeInterval)linphone_proxy_config_get_expires(proxyCfg)*/
|
||||
handler:^{
|
||||
LOGW(@"keepalive handler");
|
||||
if (mLastKeepAliveDate)
|
||||
[mLastKeepAliveDate release];
|
||||
mLastKeepAliveDate=[NSDate date];
|
||||
[mLastKeepAliveDate retain];
|
||||
if (theLinphoneCore == nil) {
|
||||
LOGW(@"It seems that Linphone BG mode was deactivated, just skipping");
|
||||
return;
|
||||
|
|
@ -1745,7 +1723,7 @@ static int comp_call_state_paused (const LinphoneCall* call, const void* param)
|
|||
UInt32 lNewRouteSize = sizeof(lNewRoute);
|
||||
OSStatus lStatus = AudioSessionGetProperty(kAudioSessionProperty_AudioRoute, &lNewRouteSize, &lNewRoute);
|
||||
if (!lStatus && lNewRouteSize > 0) {
|
||||
NSString *route = (NSString *) lNewRoute;
|
||||
NSString *route = (__bridge NSString *) lNewRoute;
|
||||
notallow = [route isEqualToString: @"Headset"] ||
|
||||
[route isEqualToString: @"Headphone"] ||
|
||||
[route isEqualToString: @"HeadphonesAndMicrophone"] ||
|
||||
|
|
@ -1764,14 +1742,14 @@ static void audioRouteChangeListenerCallback (
|
|||
const void *inPropertyValue // 4
|
||||
) {
|
||||
if (inPropertyID != kAudioSessionProperty_AudioRouteChange) return; // 5
|
||||
LinphoneManager* lm = (LinphoneManager*)inUserData;
|
||||
LinphoneManager* lm = (__bridge LinphoneManager*)inUserData;
|
||||
|
||||
bool speakerEnabled = false;
|
||||
CFStringRef lNewRoute = CFSTR("Unknown");
|
||||
UInt32 lNewRouteSize = sizeof(lNewRoute);
|
||||
OSStatus lStatus = AudioSessionGetProperty(kAudioSessionProperty_AudioRoute, &lNewRouteSize, &lNewRoute);
|
||||
if (!lStatus && lNewRouteSize > 0) {
|
||||
NSString *route = (NSString *) lNewRoute;
|
||||
NSString *route = (__bridge NSString *) lNewRoute;
|
||||
LOGI(@"Current audio route is [%s]", [route cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
|
||||
speakerEnabled = [route isEqualToString: @"Speaker"] ||
|
||||
|
|
@ -1850,7 +1828,6 @@ static void audioRouteChangeListenerCallback (
|
|||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1863,11 +1840,8 @@ static void audioRouteChangeListenerCallback (
|
|||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
[callCenter release];
|
||||
return;
|
||||
}
|
||||
[callCenter release];
|
||||
|
||||
LinphoneProxyConfig* proxyCfg;
|
||||
//get default proxy
|
||||
|
|
@ -1892,7 +1866,6 @@ static void audioRouteChangeListenerCallback (
|
|||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
|
||||
}
|
||||
LinphoneAddress* linphoneAddress = linphone_core_interpret_url(theLinphoneCore, [address cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
|
|
@ -1919,7 +1892,6 @@ static void audioRouteChangeListenerCallback (
|
|||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[error release];
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1927,8 +1899,8 @@ static void audioRouteChangeListenerCallback (
|
|||
if (call) {
|
||||
// The LinphoneCallAppData object should be set on call creation with callback
|
||||
// - (void)onCall:StateChanged:withMessage:. If not, we are in big trouble and expect it to crash
|
||||
// We are NOT responsible for creating the AppData.
|
||||
LinphoneCallAppData* data=(LinphoneCallAppData*)linphone_call_get_user_pointer(call);
|
||||
// We are NOT responsible for creating the AppData.
|
||||
LinphoneCallAppData* data=(__bridge LinphoneCallAppData*)linphone_call_get_user_data(call);
|
||||
if (data==nil)
|
||||
LOGE(@"New call instanciated but app data was not set. Expect it to crash.");
|
||||
/* will be used later to notify user if video was not activated because of the linphone core*/
|
||||
|
|
@ -1946,12 +1918,11 @@ static void audioRouteChangeListenerCallback (
|
|||
return;
|
||||
}
|
||||
if(pushNotificationToken != nil) {
|
||||
[pushNotificationToken release];
|
||||
pushNotificationToken = nil;
|
||||
}
|
||||
|
||||
if(apushNotificationToken != nil) {
|
||||
pushNotificationToken = [apushNotificationToken retain];
|
||||
pushNotificationToken = apushNotificationToken;
|
||||
}
|
||||
LinphoneProxyConfig *cfg=nil;
|
||||
linphone_core_get_default_proxy(theLinphoneCore, &cfg);
|
||||
|
|
@ -2110,7 +2081,6 @@ static void audioRouteChangeListenerCallback (
|
|||
NSData* data = [NSJSONSerialization dataWithJSONObject:appDataDict options:0 error:nil];
|
||||
NSString* appdataJSON = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
||||
linphone_chat_message_set_appdata(msg, [appdataJSON UTF8String]);
|
||||
[appdataJSON release];
|
||||
}
|
||||
|
||||
#pragma mark - LPConfig Functions
|
||||
|
|
@ -2181,7 +2151,6 @@ static void audioRouteChangeListenerCallback (
|
|||
if (mCallCenter != nil) {
|
||||
LOGI(@"Removing CT call center listener [%p]",mCallCenter);
|
||||
mCallCenter.callEventHandler=NULL;
|
||||
[mCallCenter release];
|
||||
}
|
||||
mCallCenter=nil;
|
||||
}
|
||||
|
|
@ -2191,10 +2160,12 @@ static void audioRouteChangeListenerCallback (
|
|||
[self removeCTCallCenterCb];
|
||||
mCallCenter = [[CTCallCenter alloc] init];
|
||||
LOGI(@"Adding CT call center listener [%p]",mCallCenter);
|
||||
__block __weak LinphoneManager* weakSelf = self;
|
||||
__block __weak CTCallCenter* weakCCenter = mCallCenter;
|
||||
mCallCenter.callEventHandler = ^(CTCall* call) {
|
||||
// post on main thread
|
||||
[self performSelectorOnMainThread:@selector(handleGSMCallInteration:)
|
||||
withObject:mCallCenter
|
||||
[weakSelf performSelectorOnMainThread:@selector(handleGSMCallInteration:)
|
||||
withObject:weakCCenter
|
||||
waitUntilDone:YES];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -66,8 +66,5 @@ if (au!=0) LOGE(@"UIBluetoothButton error for %s: ret=%ld",method,au)
|
|||
return false;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -30,40 +30,40 @@
|
|||
@interface UICallBar: TPMultiLayoutViewController {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIPauseButton* pauseButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* conferenceButton;
|
||||
@property (nonatomic, retain) IBOutlet UIVideoButton* videoButton;
|
||||
@property (nonatomic, retain) IBOutlet UIMicroButton* microButton;
|
||||
@property (nonatomic, retain) IBOutlet UISpeakerButton* speakerButton;
|
||||
@property (nonatomic, retain) IBOutlet UIToggleButton* routesButton;
|
||||
@property (nonatomic, retain) IBOutlet UIToggleButton* optionsButton;
|
||||
@property (nonatomic, retain) IBOutlet UIHangUpButton* hangupButton;
|
||||
@property (nonatomic, retain) IBOutlet UIView* padView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* routesView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* optionsView;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* routesReceiverButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* routesSpeakerButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* routesBluetoothButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* optionsAddButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* optionsTransferButton;
|
||||
@property (nonatomic, retain) IBOutlet UIToggleButton* dialerButton;
|
||||
@property (nonatomic, strong) IBOutlet UIPauseButton* pauseButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* conferenceButton;
|
||||
@property (nonatomic, strong) IBOutlet UIVideoButton* videoButton;
|
||||
@property (nonatomic, strong) IBOutlet UIMicroButton* microButton;
|
||||
@property (nonatomic, strong) IBOutlet UISpeakerButton* speakerButton;
|
||||
@property (nonatomic, strong) IBOutlet UIToggleButton* routesButton;
|
||||
@property (nonatomic, strong) IBOutlet UIToggleButton* optionsButton;
|
||||
@property (nonatomic, strong) IBOutlet UIHangUpButton* hangupButton;
|
||||
@property (nonatomic, strong) IBOutlet UIView* padView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* routesView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* optionsView;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* routesReceiverButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* routesSpeakerButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* routesBluetoothButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* optionsAddButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* optionsTransferButton;
|
||||
@property (nonatomic, strong) IBOutlet UIToggleButton* dialerButton;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* leftPadding;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* rightPadding;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* leftPadding;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* rightPadding;
|
||||
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* oneButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* twoButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* threeButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* fourButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* fiveButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* sixButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* sevenButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* eightButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* nineButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* starButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* zeroButton;
|
||||
@property (nonatomic, retain) IBOutlet UIDigitButton* sharpButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* oneButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* twoButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* threeButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* fourButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* fiveButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* sixButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* sevenButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* eightButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* nineButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* starButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* zeroButton;
|
||||
@property (nonatomic, strong) IBOutlet UIDigitButton* sharpButton;
|
||||
|
||||
- (IBAction)onRoutesClick:(id)sender;
|
||||
- (IBAction)onRoutesBluetoothClick:(id)sender;
|
||||
|
|
|
|||
|
|
@ -67,40 +67,11 @@
|
|||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[pauseButton release];
|
||||
[conferenceButton release];
|
||||
[videoButton release];
|
||||
[microButton release];
|
||||
[speakerButton release];
|
||||
[routesButton release];
|
||||
[optionsButton release];
|
||||
[routesBluetoothButton release];
|
||||
[routesReceiverButton release];
|
||||
[routesSpeakerButton release];
|
||||
[optionsAddButton release];
|
||||
[optionsTransferButton release];
|
||||
[dialerButton release];
|
||||
|
||||
[oneButton release];
|
||||
[twoButton release];
|
||||
[threeButton release];
|
||||
[fourButton release];
|
||||
[fiveButton release];
|
||||
[sixButton release];
|
||||
[sevenButton release];
|
||||
[eightButton release];
|
||||
[nineButton release];
|
||||
[starButton release];
|
||||
[zeroButton release];
|
||||
[sharpButton release];
|
||||
|
||||
[padView release];
|
||||
[routesView release];
|
||||
[optionsView release];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@
|
|||
@interface UICallButton : UIButton {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITextField* addressField;
|
||||
@property (nonatomic, strong) IBOutlet UITextField* addressField;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -57,11 +57,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[addressField release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
|
|
|||
|
|
@ -39,61 +39,61 @@ typedef enum _UICallCellOtherView {
|
|||
|
||||
- (id)init:(LinphoneCall*) call minimized:(BOOL)minimized;
|
||||
|
||||
@property (nonatomic, retain) UIImage *image;
|
||||
@property (nonatomic, retain) NSString *address;
|
||||
@property (nonatomic, strong) UIImage *image;
|
||||
@property (nonatomic, strong) NSString *address;
|
||||
|
||||
@end
|
||||
|
||||
@interface UICallCell : UITransparentTVCell {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) UICallCellData *data;
|
||||
@property (nonatomic, strong) UICallCellData *data;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* headerBackgroundImage;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* headerBackgroundHighlightImage;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* headerBackgroundImage;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* headerBackgroundHighlightImage;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel* addressLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* stateLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* stateImage;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* avatarImage;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *removeButton;
|
||||
@property (nonatomic, retain) IBOutlet UIPauseButton *pauseButton;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* addressLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* stateLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* stateImage;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* avatarImage;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *removeButton;
|
||||
@property (nonatomic, strong) IBOutlet UIPauseButton *pauseButton;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* headerView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* avatarView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* headerView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* avatarView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* audioStatsView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* audioStatsView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel* audioCodecLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* audioCodecHeaderLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* audioUploadBandwidthLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* audioUploadBandwidthHeaderLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* audioDownloadBandwidthLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* audioDownloadBandwidthHeaderLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* audioIceConnectivityLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* audioIceConnectivityHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* audioCodecLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* audioCodecHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* audioUploadBandwidthLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* audioUploadBandwidthHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* audioDownloadBandwidthLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* audioDownloadBandwidthHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* audioIceConnectivityLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* audioIceConnectivityHeaderLabel;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* videoStatsView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* videoStatsView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel* videoCodecLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* videoCodecHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* videoCodecLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* videoCodecHeaderLabel;
|
||||
|
||||
@property (retain, nonatomic) IBOutlet UILabel *videoSentSizeHeaderLabel;
|
||||
@property (retain, nonatomic) IBOutlet UILabel *videoSentSizeLabel;
|
||||
@property (retain, nonatomic) IBOutlet UILabel *videoRecvSizeHeaderLabel;
|
||||
@property (retain, nonatomic) IBOutlet UILabel *videoRecvSizeLabel;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *videoSentSizeHeaderLabel;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *videoSentSizeLabel;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *videoRecvSizeHeaderLabel;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *videoRecvSizeLabel;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel* videoUploadBandwidthLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* videoUploadBandwidthHeaderLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* videoDownloadBandwidthLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* videoDownloadBandwidthHeaderLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* videoIceConnectivityLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* videoIceConnectivityHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* videoUploadBandwidthLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* videoUploadBandwidthHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* videoDownloadBandwidthLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* videoDownloadBandwidthHeaderLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* videoIceConnectivityLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* videoIceConnectivityHeaderLabel;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* otherView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* otherView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UISwipeGestureRecognizer *detailsLeftSwipeGestureRecognizer;
|
||||
@property (nonatomic, retain) IBOutlet UISwipeGestureRecognizer *detailsRightSwipeGestureRecognizer;
|
||||
@property (nonatomic, strong) IBOutlet UISwipeGestureRecognizer *detailsLeftSwipeGestureRecognizer;
|
||||
@property (nonatomic, strong) IBOutlet UISwipeGestureRecognizer *detailsRightSwipeGestureRecognizer;
|
||||
|
||||
@property (assign) BOOL firstCell;
|
||||
@property (assign) BOOL conferenceCell;
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
self->minimize = minimized;
|
||||
self->view = UICallCellOtherView_Avatar;
|
||||
self->call = acall;
|
||||
image = [[UIImage imageNamed:@"avatar_unknown.png"] retain];
|
||||
address = [NSLocalizedString(@"Unknown",nil) retain];
|
||||
image = [UIImage imageNamed:@"avatar_unknown.png"];
|
||||
address = NSLocalizedString(@"Unknown",nil);
|
||||
[self update];
|
||||
}
|
||||
return self;
|
||||
|
|
@ -82,12 +82,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[address release];
|
||||
[image release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
@ -200,53 +194,16 @@
|
|||
object:nil];
|
||||
|
||||
|
||||
[headerBackgroundImage release];
|
||||
[headerBackgroundHighlightImage release];
|
||||
|
||||
[addressLabel release];
|
||||
[stateLabel release];
|
||||
[stateImage release];
|
||||
[avatarImage release];
|
||||
[pauseButton release];
|
||||
[removeButton release];
|
||||
|
||||
[headerView release];
|
||||
[avatarView release];
|
||||
|
||||
[audioStatsView release];
|
||||
|
||||
[audioCodecLabel release];
|
||||
[audioCodecHeaderLabel release];
|
||||
[audioUploadBandwidthLabel release];
|
||||
[audioUploadBandwidthHeaderLabel release];
|
||||
[audioDownloadBandwidthLabel release];
|
||||
[audioDownloadBandwidthHeaderLabel release];
|
||||
[audioIceConnectivityLabel release];
|
||||
[audioIceConnectivityHeaderLabel release];
|
||||
|
||||
[videoStatsView release];
|
||||
|
||||
[videoCodecLabel release];
|
||||
[videoCodecHeaderLabel release];
|
||||
[videoUploadBandwidthLabel release];
|
||||
[videoUploadBandwidthHeaderLabel release];
|
||||
[videoDownloadBandwidthLabel release];
|
||||
[videoDownloadBandwidthHeaderLabel release];
|
||||
[videoIceConnectivityLabel release];
|
||||
[videoIceConnectivityHeaderLabel release];
|
||||
|
||||
[otherView release];
|
||||
|
||||
[data release];
|
||||
|
||||
[detailsLeftSwipeGestureRecognizer release];
|
||||
[detailsRightSwipeGestureRecognizer release];
|
||||
|
||||
[videoSentSizeHeaderLabel release];
|
||||
[videoSentSizeLabel release];
|
||||
[videoRecvSizeHeaderLabel release];
|
||||
[videoRecvSizeLabel release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -257,11 +214,10 @@
|
|||
return;
|
||||
}
|
||||
if(data != nil) {
|
||||
[data release];
|
||||
data = nil;
|
||||
}
|
||||
if(adata != nil) {
|
||||
data = [adata retain];
|
||||
data = adata;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@
|
|||
|
||||
@interface UICamSwitch : UIButton
|
||||
|
||||
@property (nonatomic, assign) IBOutlet UIView* preview;
|
||||
@property (nonatomic, weak) IBOutlet UIView* preview;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
- (id)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initUICamSwitch];
|
||||
if (!(self = [self initUICamSwitch])) return nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initUICamSwitch];
|
||||
if (!(self = [self initUICamSwitch])) return nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
self = [super initWithCoder:decoder];
|
||||
if (self) {
|
||||
[self initUICamSwitch];
|
||||
if (!(self = [self initUICamSwitch])) return nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@
|
|||
LinphoneChatRoom* chatRoom;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *avatarImage;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* addressLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* chatContentLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIButton * deleteButton;
|
||||
@property (nonatomic, retain) IBOutlet UIView * unreadMessageView;
|
||||
@property (nonatomic, retain) IBOutlet UILabel * unreadMessageLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView *avatarImage;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* addressLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* chatContentLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIButton * deleteButton;
|
||||
@property (nonatomic, strong) IBOutlet UIView * unreadMessageView;
|
||||
@property (nonatomic, strong) IBOutlet UILabel * unreadMessageLabel;
|
||||
|
||||
- (id)initWithIdentifier:(NSString*)identifier;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,16 +49,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[addressLabel release];
|
||||
[chatContentLabel release];
|
||||
[avatarImage release];
|
||||
[deleteButton release];
|
||||
[unreadMessageLabel release];
|
||||
[unreadMessageView release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Property Funcitons
|
||||
|
|
|
|||
|
|
@ -30,22 +30,22 @@
|
|||
LinphoneChatMessage* chat;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView *innerView;
|
||||
@property (nonatomic, retain) IBOutlet UIView *bubbleView;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* backgroundImage;
|
||||
@property (nonatomic, retain) IBOutlet UITextViewNoDefine *messageText;
|
||||
@property (nonatomic, retain) IBOutlet UILoadingImageView *messageImageView;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *deleteButton;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *dateLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* statusImage;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* downloadButton;
|
||||
@property (nonatomic, retain) IBOutlet UITapGestureRecognizer* imageTapGestureRecognizer;
|
||||
@property (nonatomic, retain) IBOutlet UITapGestureRecognizer* resendTapGestureRecognizer;
|
||||
@property (nonatomic, strong) IBOutlet UIView *innerView;
|
||||
@property (nonatomic, strong) IBOutlet UIView *bubbleView;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* backgroundImage;
|
||||
@property (nonatomic, strong) IBOutlet UITextViewNoDefine *messageText;
|
||||
@property (nonatomic, strong) IBOutlet UILoadingImageView *messageImageView;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *deleteButton;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *dateLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* statusImage;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* downloadButton;
|
||||
@property (nonatomic, strong) IBOutlet UITapGestureRecognizer* imageTapGestureRecognizer;
|
||||
@property (nonatomic, strong) IBOutlet UITapGestureRecognizer* resendTapGestureRecognizer;
|
||||
|
||||
- (id)initWithIdentifier:(NSString*)identifier;
|
||||
+ (CGFloat)height:(LinphoneChatMessage*)chatMessage width:(int)width;
|
||||
|
||||
@property (nonatomic, retain) id<ChatRoomDelegate> chatRoomDelegate;
|
||||
@property (nonatomic, strong) id<ChatRoomDelegate> chatRoomDelegate;
|
||||
|
||||
- (IBAction)onDeleteClick:(id)event;
|
||||
- (IBAction)onDownloadClick:(id)event;
|
||||
|
|
|
|||
|
|
@ -80,22 +80,6 @@ static UIFont *CELL_FONT = nil;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[chatRoomDelegate release];
|
||||
[backgroundImage release];
|
||||
[innerView release];
|
||||
[bubbleView release];
|
||||
[messageText release];
|
||||
[messageImageView release];
|
||||
[deleteButton release];
|
||||
[dateLabel release];
|
||||
[statusImage release];
|
||||
[downloadButton release];
|
||||
[imageTapGestureRecognizer release];
|
||||
[resendTapGestureRecognizer release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
|
|
@ -150,7 +134,6 @@ static UIFont *CELL_FONT = nil;
|
|||
[messageImageView setImage:image];
|
||||
[messageImageView setFullImageUrl:asset];
|
||||
[messageImageView stopLoading];
|
||||
[image release];
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -174,7 +157,6 @@ static UIFont *CELL_FONT = nil;
|
|||
attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17.0],
|
||||
NSForegroundColorAttributeName:[UIColor darkGrayColor]}];
|
||||
messageText.attributedText = attr_text;
|
||||
[attr_text release];
|
||||
|
||||
} else {
|
||||
messageText.text = @"";
|
||||
|
|
@ -194,7 +176,6 @@ static UIFont *CELL_FONT = nil;
|
|||
NSLocale *locale = [NSLocale currentLocale];
|
||||
[dateFormatter setLocale:locale];
|
||||
[dateLabel setText:[dateFormatter stringFromDate:message_date]];
|
||||
[dateFormatter release];
|
||||
|
||||
LinphoneChatMessageState state = linphone_chat_message_get_state(chat);
|
||||
BOOL outgoing = linphone_chat_message_is_outgoing(chat);
|
||||
|
|
@ -218,7 +199,6 @@ static UIFont *CELL_FONT = nil;
|
|||
initWithString:NSLocalizedString(@"Resend", @"Resend")
|
||||
attributes:@{NSForegroundColorAttributeName: [UIColor redColor]}];
|
||||
[dateLabel setAttributedText:resend_text];
|
||||
[resend_text release];
|
||||
}
|
||||
|
||||
if( outgoing){
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@
|
|||
@interface UICompositeViewDescription: NSObject{
|
||||
}
|
||||
|
||||
@property (retain) NSString *name;
|
||||
@property (retain) NSString *content;
|
||||
@property (retain) NSString *stateBar;
|
||||
@property (strong) NSString *name;
|
||||
@property (strong) NSString *content;
|
||||
@property (strong) NSString *stateBar;
|
||||
@property (assign) BOOL stateBarEnabled;
|
||||
@property (retain) NSString *tabBar;
|
||||
@property (strong) NSString *tabBar;
|
||||
@property (assign) BOOL tabBarEnabled;
|
||||
@property (assign) BOOL fullscreen;
|
||||
@property (assign) BOOL landscapeMode;
|
||||
|
|
@ -62,11 +62,11 @@
|
|||
UIInterfaceOrientation currentOrientation;
|
||||
}
|
||||
|
||||
@property (retain) CATransition *viewTransition;
|
||||
@property (strong) CATransition *viewTransition;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* stateBarView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* contentView;
|
||||
@property (nonatomic, retain) IBOutlet UIView* tabBarView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* stateBarView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* contentView;
|
||||
@property (nonatomic, strong) IBOutlet UIView* tabBarView;
|
||||
|
||||
- (void)changeView:(UICompositeViewDescription *)description;
|
||||
- (void)setFullScreen:(BOOL) enabled;
|
||||
|
|
|
|||
|
|
@ -73,20 +73,13 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[name release];
|
||||
[content release];
|
||||
[stateBar release];
|
||||
[tabBar release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
@interface UICompositeViewController ()
|
||||
|
||||
@property (nonatomic, retain) UIViewController *stateBarViewController;
|
||||
@property (nonatomic, retain) UIViewController *tabBarViewController;
|
||||
@property (nonatomic, retain) UIViewController *contentViewController;
|
||||
@property (nonatomic, strong) UIViewController *stateBarViewController;
|
||||
@property (nonatomic, strong) UIViewController *tabBarViewController;
|
||||
@property (nonatomic, strong) UIViewController *contentViewController;
|
||||
|
||||
@end
|
||||
|
||||
|
|
@ -135,19 +128,6 @@
|
|||
|
||||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[self.stateBarViewController release];
|
||||
[self.tabBarViewController release];
|
||||
[self.contentViewController release];
|
||||
|
||||
[contentView release];
|
||||
[stateBarView release];
|
||||
[tabBarView release];
|
||||
[viewControllerCache release];
|
||||
[viewTransition release];
|
||||
[currentViewDescription release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -367,7 +347,7 @@
|
|||
if(name != nil) {
|
||||
controller = [viewControllerCache objectForKey:name];
|
||||
if(controller == nil) {
|
||||
controller = [[[NSClassFromString(name) alloc] init] autorelease];
|
||||
controller = [[NSClassFromString(name) alloc] init];
|
||||
[viewControllerCache setValue:controller forKey:name];
|
||||
[controller view]; // Load the view
|
||||
}
|
||||
|
|
@ -602,9 +582,6 @@
|
|||
}
|
||||
|
||||
// Dealloc old view description
|
||||
if(oldViewDescription != nil) {
|
||||
[oldViewDescription release];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) changeView:(UICompositeViewDescription *)description {
|
||||
|
|
@ -625,7 +602,7 @@
|
|||
}
|
||||
|
||||
- (UIViewController *) getCurrentViewController {
|
||||
return [[self.contentViewController retain] autorelease];
|
||||
return self.contentViewController;
|
||||
}
|
||||
|
||||
- (BOOL)currentViewSupportsLandscape {
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
@interface UIConferenceHeader : UIViewController {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* stateImage;
|
||||
@property (nonatomic, retain) IBOutlet UIPauseButton *pauseButton;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* stateImage;
|
||||
@property (nonatomic, strong) IBOutlet UIPauseButton *pauseButton;
|
||||
|
||||
+ (int)getHeight;
|
||||
- (void)update;
|
||||
|
|
|
|||
|
|
@ -33,11 +33,6 @@
|
|||
return [super initWithNibName:@"UIConferenceHeader" bundle:[NSBundle mainBundle]];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[stateImage release];
|
||||
[pauseButton release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
@interface UIContactCell : UITransparentTVCell {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel* firstNameLabel;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* lastNameLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *avatarImage;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* firstNameLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* lastNameLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView *avatarImage;
|
||||
@property (nonatomic, assign) ABRecordRef contact;
|
||||
|
||||
- (id)initWithIdentifier:(NSString*)identifier;
|
||||
|
|
|
|||
|
|
@ -44,13 +44,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[firstNameLabel release];
|
||||
[lastNameLabel release];
|
||||
[avatarImage release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Property Functions
|
||||
|
|
@ -88,31 +81,25 @@
|
|||
CFStringRef lLocalizedOrganization = (lOrganization != nil)?ABAddressBookCopyLocalizedLabel(lOrganization):nil;
|
||||
|
||||
if(lLocalizedFirstName != nil){
|
||||
[firstNameLabel setText: (NSString *)lLocalizedFirstName];
|
||||
[firstNameLabel setText: (NSString *)CFBridgingRelease(lLocalizedFirstName)];
|
||||
}
|
||||
else
|
||||
[firstNameLabel setText: @""];
|
||||
|
||||
if(lLocalizedLastName != nil){
|
||||
[lastNameLabel setText: (NSString *)lLocalizedLastName];
|
||||
[lastNameLabel setText: (NSString *)CFBridgingRelease(lLocalizedLastName)];
|
||||
}
|
||||
else
|
||||
[lastNameLabel setText: @""];
|
||||
|
||||
if(lLocalizedFirstName == nil && lLocalizedLastName == nil) {
|
||||
[firstNameLabel setText: (NSString *)lLocalizedOrganization];
|
||||
[firstNameLabel setText: (NSString *)CFBridgingRelease(lLocalizedOrganization)];
|
||||
}
|
||||
|
||||
if(lLocalizedOrganization != nil)
|
||||
CFRelease(lLocalizedOrganization);
|
||||
if(lOrganization != nil)
|
||||
CFRelease(lOrganization);
|
||||
if(lLocalizedLastName != nil)
|
||||
CFRelease(lLocalizedLastName);
|
||||
if(lLastName != nil)
|
||||
CFRelease(lLastName);
|
||||
if(lLocalizedFirstName != nil)
|
||||
CFRelease(lLocalizedFirstName);
|
||||
if(lFirstName != nil)
|
||||
CFRelease(lFirstName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
@interface UIContactDetailsFooter : UIViewController {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton *removeButton;
|
||||
@property (nonatomic, retain) IBOutlet id<ContactDetailsDelegate> contactDetailsDelegate;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *removeButton;
|
||||
@property (nonatomic, strong) IBOutlet id<ContactDetailsDelegate> contactDetailsDelegate;
|
||||
|
||||
- (IBAction)onRemoveClick:(id)event;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,11 +54,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[removeButton release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Action Functions
|
||||
|
|
|
|||
|
|
@ -31,15 +31,15 @@
|
|||
|
||||
@property (nonatomic, assign) ABRecordRef contact;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UILabel *addressLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *avatarImage;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *addressLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView *avatarImage;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView *normalView;
|
||||
@property (nonatomic, retain) IBOutlet UIView *editView;
|
||||
@property (nonatomic, retain) IBOutlet UITableView *tableView;
|
||||
@property (nonatomic, retain) IBOutlet id<ContactDetailsDelegate> contactDetailsDelegate;
|
||||
@property (nonatomic, strong) IBOutlet UIView *normalView;
|
||||
@property (nonatomic, strong) IBOutlet UIView *editView;
|
||||
@property (nonatomic, strong) IBOutlet UITableView *tableView;
|
||||
@property (nonatomic, strong) IBOutlet id<ContactDetailsDelegate> contactDetailsDelegate;
|
||||
|
||||
@property (retain, nonatomic) ImagePickerViewController* popoverController;
|
||||
@property (strong, nonatomic) ImagePickerViewController* popoverController;
|
||||
|
||||
@property(nonatomic,getter=isEditing) BOOL editing;
|
||||
|
||||
|
|
|
|||
|
|
@ -72,17 +72,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[avatarImage release];
|
||||
[addressLabel release];
|
||||
[normalView release];
|
||||
[editView release];
|
||||
[tableView release];
|
||||
|
||||
[propertyList release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
|
@ -184,9 +173,8 @@
|
|||
}
|
||||
|
||||
+ (NSString*)localizeLabel:(NSString*)str {
|
||||
CFStringRef lLocalizedLabel = ABAddressBookCopyLocalizedLabel((CFStringRef) str);
|
||||
NSString * retStr = [NSString stringWithString:(NSString*) lLocalizedLabel];
|
||||
CFRelease(lLocalizedLabel);
|
||||
CFStringRef lLocalizedLabel = ABAddressBookCopyLocalizedLabel((__bridge CFStringRef) str);
|
||||
NSString * retStr = (NSString*) CFBridgingRelease(lLocalizedLabel);
|
||||
return retStr;
|
||||
}
|
||||
|
||||
|
|
@ -204,7 +192,7 @@
|
|||
static NSString *kCellId = @"ContactDetailsHeaderCell";
|
||||
UIEditableTableViewCell *cell = [atableView dequeueReusableCellWithIdentifier:kCellId];
|
||||
if (cell == nil) {
|
||||
cell = [[[UIEditableTableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:kCellId] autorelease];
|
||||
cell = [[UIEditableTableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:kCellId];
|
||||
[cell.detailTextField setAutocapitalizationType:UITextAutocapitalizationTypeWords];
|
||||
[cell.detailTextField setAutocorrectionType:UITextAutocorrectionTypeNo];
|
||||
[cell.detailTextField setKeyboardType:UIKeyboardTypeDefault];
|
||||
|
|
@ -225,11 +213,10 @@
|
|||
|
||||
// setup values, if they exist
|
||||
if(contact) {
|
||||
CFStringRef lValue = ABRecordCopyValue(contact, property);
|
||||
NSString* lValue = CFBridgingRelease( ABRecordCopyValue(contact, property) );
|
||||
if(lValue != NULL) {
|
||||
[cell.detailTextLabel setText:(NSString*)lValue];
|
||||
[cell.detailTextField setText:(NSString*)lValue];
|
||||
CFRelease(lValue);
|
||||
[cell.detailTextLabel setText:lValue];
|
||||
[cell.detailTextField setText:lValue];
|
||||
} else {
|
||||
[cell.detailTextLabel setText:@""];
|
||||
[cell.detailTextField setText:@""];
|
||||
|
|
@ -272,7 +259,7 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
DTActionSheet *sheet = [[[DTActionSheet alloc] initWithTitle:NSLocalizedString(@"Select picture source",nil)] autorelease];
|
||||
DTActionSheet *sheet = [[DTActionSheet alloc] initWithTitle:NSLocalizedString(@"Select picture source",nil)];
|
||||
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
|
||||
[sheet addButtonWithTitle:NSLocalizedString(@"Camera",nil) block:^(){
|
||||
showAppropriateController(UIImagePickerControllerSourceTypeCamera);
|
||||
|
|
@ -285,9 +272,9 @@
|
|||
}
|
||||
if([FastAddressBook getContactImage:contact thumbnail:true] != nil) {
|
||||
[sheet addDestructiveButtonWithTitle:NSLocalizedString(@"Remove", nil) block:^(){
|
||||
NSError* error = NULL;
|
||||
if(!ABPersonRemoveImageData(contact, (CFErrorRef*)error)) {
|
||||
LOGI(@"Can't remove entry: %@", [error localizedDescription]);
|
||||
CFErrorRef error = NULL;
|
||||
if(!ABPersonRemoveImageData(contact, (CFErrorRef*)&error)) {
|
||||
LOGI(@"Can't remove entry: %@", [(__bridge NSError*)error localizedDescription]);
|
||||
}
|
||||
[self update];
|
||||
}];
|
||||
|
|
@ -314,17 +301,17 @@
|
|||
}
|
||||
}
|
||||
FastAddressBook* fab = [LinphoneManager instance].fastAddressBook;
|
||||
NSError* error = NULL;
|
||||
if(!ABPersonRemoveImageData(contact, (CFErrorRef*)error)) {
|
||||
LOGI(@"Can't remove entry: %@", [error localizedDescription]);
|
||||
CFErrorRef error = NULL;
|
||||
if(!ABPersonRemoveImageData(contact, (CFErrorRef*)&error)) {
|
||||
LOGI(@"Can't remove entry: %@", [(__bridge NSError*)error localizedDescription]);
|
||||
}
|
||||
NSData *dataRef = UIImageJPEGRepresentation(image, 0.9f);
|
||||
CFDataRef cfdata = CFDataCreate(NULL,[dataRef bytes], [dataRef length]);
|
||||
|
||||
[fab saveAddressBook];
|
||||
|
||||
if(!ABPersonSetImageData(contact, cfdata, (CFErrorRef*)error)) {
|
||||
LOGI(@"Can't add entry: %@", [error localizedDescription]);
|
||||
if(!ABPersonSetImageData(contact, cfdata, (CFErrorRef*)&error)) {
|
||||
LOGI(@"Can't add entry: %@", [(__bridge NSError*)error localizedDescription]);
|
||||
} else {
|
||||
[fab saveAddressBook];
|
||||
}
|
||||
|
|
@ -367,10 +354,10 @@
|
|||
NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
|
||||
ABPropertyID property = [[propertyList objectAtIndex:[indexPath row]] intValue];
|
||||
[cell.detailTextLabel setText:[textField text]];
|
||||
NSError* error = NULL;
|
||||
ABRecordSetValue(contact, property, [textField text], (CFErrorRef*)&error);
|
||||
CFErrorRef error = NULL;
|
||||
ABRecordSetValue(contact, property, (__bridge CFTypeRef)([textField text]), (CFErrorRef*)&error);
|
||||
if (error != NULL) {
|
||||
LOGE(@"Error when saving property %i in contact %p: Fail(%@)", property, contact, [error localizedDescription]);
|
||||
LOGE(@"Error when saving property %i in contact %p: Fail(%@)", property, contact, [(__bridge NSError*)error localizedDescription]);
|
||||
}
|
||||
} else {
|
||||
LOGW(@"Not valid UIEditableTableViewCell");
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
@interface UIDigitButton : UILongTouchButton {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITextField* addressField;
|
||||
@property (nonatomic, strong) IBOutlet UITextField* addressField;
|
||||
@property char digit;
|
||||
@property bool dtmf;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,10 +60,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[addressField release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Actions Functions
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
@interface UIEditableTableViewCell : UITransparentTVCell {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView *verticalSep;
|
||||
@property (nonatomic, retain) IBOutlet UITextField *detailTextField;
|
||||
@property (nonatomic, strong) IBOutlet UIView *verticalSep;
|
||||
@property (nonatomic, strong) IBOutlet UITextField *detailTextField;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -51,16 +51,10 @@
|
|||
|
||||
[self.contentView addSubview:verticalSep];
|
||||
|
||||
[tf release];
|
||||
[v release];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
self.detailTextField = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - View Functions
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@
|
|||
@interface UIEraseButton : UILongTouchButton<UILongTouchButtonDelegate> {
|
||||
}
|
||||
|
||||
@property (nonatomic, assign) IBOutlet UITextField* addressField;
|
||||
@property (nonatomic, weak) IBOutlet UITextField* addressField;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@
|
|||
|
||||
- (void)dealloc {
|
||||
addressField = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -76,9 +76,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@
|
|||
|
||||
@property (nonatomic, assign) LinphoneCallLog *callLog;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* imageView;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* addressLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* detailsButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* deleteButton;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* imageView;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* addressLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* detailsButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* deleteButton;
|
||||
|
||||
- (id)initWithIdentifier:(NSString*)identifier;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,14 +47,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[detailsButton release];
|
||||
[deleteButton release];
|
||||
[addressLabel release];
|
||||
[imageView release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Action Functions
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
|
||||
UIImage *decompressedImage = [[UIImage alloc] initWithCGImage:decompressedImageRef scale:image.scale orientation:image.imageOrientation];
|
||||
CGImageRelease(decompressedImageRef);
|
||||
return [decompressedImage autorelease];
|
||||
return decompressedImage;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
}
|
||||
|
||||
@property (retain, nonatomic) IBOutlet TUNinePatch *backgroundNinePatch;
|
||||
@property (retain, nonatomic) IBOutlet TUNinePatch *backgroundOverNinePatch;
|
||||
@property (strong, nonatomic) IBOutlet TUNinePatch *backgroundNinePatch;
|
||||
@property (strong, nonatomic) IBOutlet TUNinePatch *backgroundOverNinePatch;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@
|
|||
|
||||
}
|
||||
|
||||
@property (retain, nonatomic) IBOutlet TUNinePatch *backgroundNinePatch;
|
||||
@property (strong, nonatomic) IBOutlet TUNinePatch *backgroundNinePatch;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -56,11 +56,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[backgroundNinePatch release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (CGRect)textRectForBounds:(CGRect)bounds {
|
||||
return CGRectInset(bounds, 6, 4);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
- (BOOL)isLoading;
|
||||
- (void)stopLoading;
|
||||
|
||||
@property (nonatomic, retain) ALAsset* fullImageUrl;
|
||||
@property (nonatomic, strong) ALAsset* fullImageUrl;
|
||||
@property (nonatomic, readonly) IBOutlet UIActivityIndicatorView *waitIndicatorView;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -76,11 +76,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[waitIndicatorView release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
- (id)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initUILongTouchButton];
|
||||
if (!(self = [self initUILongTouchButton])) return nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
- (id)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initUILongTouchButton];
|
||||
if (!(self = [self initUILongTouchButton])) return nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
self = [super initWithCoder:decoder];
|
||||
if (self) {
|
||||
[self initUILongTouchButton];
|
||||
if (!(self = [self initUILongTouchButton])) return nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -57,7 +57,6 @@
|
|||
- (void)dealloc {
|
||||
[self removeTarget:self action:@selector(___touchDown:) forControlEvents:UIControlEventTouchDown];
|
||||
[self removeTarget:self action:@selector(___touchUp:) forControlEvents:UIControlEventTouchUpInside|UIControlEventTouchUpOutside];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)___touchDown:(id) sender {
|
||||
|
|
|
|||
|
|
@ -23,15 +23,15 @@
|
|||
@interface UIMainBar : TPMultiLayoutViewController {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIButton* historyButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* contactsButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* dialerButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* settingsButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* chatButton;
|
||||
@property (nonatomic, retain) IBOutlet UIView *historyNotificationView;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *historyNotificationLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIView *chatNotificationView;
|
||||
@property (nonatomic, retain) IBOutlet UILabel *chatNotificationLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* historyButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* contactsButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* dialerButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* settingsButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* chatButton;
|
||||
@property (nonatomic, strong) IBOutlet UIView *historyNotificationView;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *historyNotificationLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIView *chatNotificationView;
|
||||
@property (nonatomic, strong) IBOutlet UILabel *chatNotificationLabel;
|
||||
|
||||
-(IBAction) onHistoryClick: (id) event;
|
||||
-(IBAction) onContactsClick: (id) event;
|
||||
|
|
|
|||
|
|
@ -47,17 +47,7 @@ static NSString * const kDisappearAnimation = @"disappear";
|
|||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
||||
[historyButton release];
|
||||
[contactsButton release];
|
||||
[dialerButton release];
|
||||
[settingsButton release];
|
||||
[chatButton release];
|
||||
[historyNotificationView release];
|
||||
[historyNotificationLabel release];
|
||||
[chatNotificationView release];
|
||||
[chatNotificationLabel release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,5 @@
|
|||
return linphone_core_is_mic_muted([LinphoneManager getLc]) == false;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ static void audioRouteChangeListenerCallback (
|
|||
const void *inPropertyValue // 4
|
||||
) {
|
||||
if (inPropertyID != kAudioSessionProperty_AudioRouteChange) return; // 5
|
||||
UISpeakerButton* button = (UISpeakerButton*)inUserData;
|
||||
UISpeakerButton* button = (__bridge UISpeakerButton*)inUserData;
|
||||
[button update];
|
||||
}
|
||||
|
||||
- (void)initUISpeakerButton {
|
||||
AudioSessionInitialize(NULL, NULL, NULL, NULL);
|
||||
OSStatus lStatus = AudioSessionAddPropertyListener(kAudioSessionProperty_AudioRouteChange, audioRouteChangeListenerCallback, self);
|
||||
OSStatus lStatus = AudioSessionAddPropertyListener(kAudioSessionProperty_AudioRouteChange, audioRouteChangeListenerCallback, (__bridge void *)(self));
|
||||
if (lStatus) {
|
||||
LOGE(@"cannot register route change handler [%ld]",lStatus);
|
||||
}
|
||||
|
|
@ -73,11 +73,10 @@ static void audioRouteChangeListenerCallback (
|
|||
}
|
||||
|
||||
- (void)dealloc {
|
||||
OSStatus lStatus = AudioSessionRemovePropertyListenerWithUserData(kAudioSessionProperty_AudioRouteChange, audioRouteChangeListenerCallback, self);
|
||||
OSStatus lStatus = AudioSessionRemovePropertyListenerWithUserData(kAudioSessionProperty_AudioRouteChange, audioRouteChangeListenerCallback, (__bridge void *)(self));
|
||||
if (lStatus) {
|
||||
LOGE(@"cannot un register route change handler [%ld]", lStatus);
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@
|
|||
DTActionSheet *securitySheet;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* registrationStateImage;
|
||||
@property (nonatomic, retain) IBOutlet UILabel* registrationStateLabel;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* callQualityImage;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* callSecurityImage;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* callSecurityButton;
|
||||
@property (retain, nonatomic) IBOutlet UILabel *voicemailCount;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* registrationStateImage;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* registrationStateLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* callQualityImage;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView* callSecurityImage;
|
||||
@property (nonatomic, strong) IBOutlet UIButton* callSecurityButton;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *voicemailCount;
|
||||
|
||||
- (IBAction)doSecurityClick:(id)sender;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,13 @@
|
|||
#import "LinphoneManager.h"
|
||||
#import "PhoneMainView.h"
|
||||
|
||||
@implementation UIStateBar
|
||||
@implementation UIStateBar {
|
||||
|
||||
NSTimer *callQualityTimer;
|
||||
NSTimer *callSecurityTimer;
|
||||
int messagesUnreadCount;
|
||||
|
||||
}
|
||||
|
||||
@synthesize registrationStateImage;
|
||||
@synthesize registrationStateLabel;
|
||||
|
|
@ -29,10 +35,6 @@
|
|||
@synthesize callSecurityImage;
|
||||
@synthesize callSecurityButton;
|
||||
|
||||
NSTimer *callQualityTimer;
|
||||
NSTimer *callSecurityTimer;
|
||||
int messagesUnreadCount;
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
- (id)init {
|
||||
|
|
@ -46,19 +48,8 @@ int messagesUnreadCount;
|
|||
}
|
||||
|
||||
- (void) dealloc {
|
||||
if(securitySheet) {
|
||||
[securitySheet release];
|
||||
}
|
||||
[registrationStateImage release];
|
||||
[registrationStateLabel release];
|
||||
[callQualityImage release];
|
||||
[callSecurityImage release];
|
||||
[callSecurityButton release];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[callQualityTimer invalidate];
|
||||
[callQualityTimer release];
|
||||
[_voicemailCount release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -337,17 +328,16 @@ int messagesUnreadCount;
|
|||
linphone_call_get_authentication_token(call)];
|
||||
}
|
||||
if( securitySheet == nil ){
|
||||
__block __strong UIStateBar* weakSelf = self;
|
||||
securitySheet = [[DTActionSheet alloc] initWithTitle:message];
|
||||
[securitySheet setDelegate:self];
|
||||
[securitySheet addButtonWithTitle:NSLocalizedString(@"Ok",nil) block:^(){
|
||||
linphone_call_set_authentication_token_verified(call, !valid);
|
||||
[securitySheet release];
|
||||
securitySheet = nil;
|
||||
weakSelf->securitySheet = nil;
|
||||
}];
|
||||
|
||||
[securitySheet addDestructiveButtonWithTitle:NSLocalizedString(@"Cancel",nil) block:^(){
|
||||
[securitySheet release];
|
||||
securitySheet = nil;
|
||||
weakSelf->securitySheet = nil;
|
||||
}];
|
||||
[securitySheet showInView:[PhoneMainView instance].view];
|
||||
}
|
||||
|
|
@ -357,7 +347,6 @@ int messagesUnreadCount;
|
|||
}
|
||||
|
||||
-(void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex{
|
||||
[securitySheet release];
|
||||
securitySheet = nil;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@
|
|||
@interface UITransferButton : UIButton {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITextField* addressField;
|
||||
@property (nonatomic, strong) IBOutlet UITextField* addressField;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -55,11 +55,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[addressField release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@
|
|||
@interface UIVideoButton : UIToggleButton<UIToggleButtonDelegate> {
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* waitView;
|
||||
@property (nonatomic, strong) IBOutlet UIActivityIndicatorView* waitView;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
LinphoneCall* call = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
if (call) {
|
||||
LinphoneCallAppData* callAppData = (LinphoneCallAppData*)linphone_call_get_user_pointer(call);
|
||||
LinphoneCallAppData* callAppData = (__bridge LinphoneCallAppData*)linphone_call_get_user_pointer(call);
|
||||
callAppData->videoRequested=TRUE; /* will be used later to notify user if video was not activated because of the linphone core*/
|
||||
LinphoneCallParams* call_params = linphone_call_params_copy(linphone_call_get_current_params(call));
|
||||
linphone_call_params_enable_video(call_params, TRUE);
|
||||
|
|
@ -120,9 +120,5 @@
|
|||
return video_enabled;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[waitView release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -104,9 +104,6 @@
|
|||
UIPinchGestureRecognizer* pinchReco = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(pinch:)];
|
||||
[videoView addGestureRecognizer:pinchReco];
|
||||
|
||||
[doubleFingerTap release];
|
||||
[pan release];
|
||||
[pinchReco release];
|
||||
|
||||
[self resetZoom];
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue