From 0c3cc9b5c711184555dad906d0e034e5499047b2 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Thu, 20 Sep 2012 11:07:03 +0200 Subject: [PATCH] Disable fastaddressbook --- Classes/LinphoneManager.h | 4 +++- Classes/LinphoneManager.m | 10 ++++++++-- Classes/LinphoneUI/UICallButton.m | 3 ++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Classes/LinphoneManager.h b/Classes/LinphoneManager.h index bffc03b24..a1907d7f4 100644 --- a/Classes/LinphoneManager.h +++ b/Classes/LinphoneManager.h @@ -43,6 +43,7 @@ extern NSString *const kLinphoneMainViewChange; /* MODIFICATION: Add buschjaeger configuration event */ extern NSString *const kLinphoneConfigurationUpdate; extern NSString *const kLinphoneConfigurationPath; +extern NSString *const kLinphonePEMPath; /**/ extern NSString *const kLinphoneAddressBookUpdate; extern NSString *const kLinphoneLogsUpdate; @@ -146,8 +147,9 @@ typedef struct _LinphoneManagerSounds { /* MODIFICATION: Add NSUSerdefault settings */ - (BOOL)reconfigureLinphone; /**/ - +/* MODIFICATION: Disable addressbook @property (readonly) FastAddressBook* fastAddressBook; +*/ @property Connectivity connectivity; @property (readonly) const char* frontCamId; @property (readonly) const char* backCamId; diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 859a9abd5..6e2a17010 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -52,6 +52,7 @@ NSString *const kLinphoneRegistrationUpdate = @"LinphoneRegistrationUpdate"; /* MODIFICATION: Add buschjaeger configuration event */ NSString *const kLinphoneConfigurationUpdate = @"LinphoneConfigurationUpdate"; NSString *const kLinphoneConfigurationPath = @"buschjaeger.ini"; +NSString *const kLinphonePEMPath = @"certificates"; /**/ NSString *const kLinphoneAddressBookUpdate = @"LinphoneAddressBookUpdate"; NSString *const kLinphoneMainViewChange = @"LinphoneMainViewChange"; @@ -87,7 +88,9 @@ extern void libmsbcg729_init(); @synthesize configuration; /**/ @synthesize database; +/* MODIFICATION: Disable addressbook @synthesize fastAddressBook; + */ @synthesize pushNotificationToken; @synthesize sounds; @synthesize logs; @@ -244,8 +247,9 @@ struct codec_name_pref_table codec_pref_table[]={ if(sounds.message) { AudioServicesDisposeSystemSoundID(sounds.message); } - + /* MODIFICATION: Disable addressbook [fastAddressBook release]; + */ [self closeDatabase]; [logs release]; @@ -661,7 +665,9 @@ static LinphoneCoreVTable linphonec_vtable = { , [factoryConfig cStringUsingEncoding:[NSString defaultCStringEncoding]] ,self); - fastAddressBook = [[FastAddressBook alloc] init]; + /* MODIFICATION: Disable addressbook + fastAddressBook = [[FastAddressBook alloc] init]; + */ linphone_core_set_root_ca(theLinphoneCore, lRootCa); // Set audio assets diff --git a/Classes/LinphoneUI/UICallButton.m b/Classes/LinphoneUI/UICallButton.m index 48bd02962..0d2791b00 100644 --- a/Classes/LinphoneUI/UICallButton.m +++ b/Classes/LinphoneUI/UICallButton.m @@ -69,10 +69,11 @@ - (void)touchUp:(id) sender { NSString *address = [addressField text]; NSString *displayName = nil; + /* MODIFICATION: Disable addressbook ABRecordRef contact = [[[LinphoneManager instance] fastAddressBook] getContact:address]; if(contact) { displayName = [FastAddressBook getContactDisplayName:contact]; - } + }*/ [[LinphoneManager instance] call:address displayName:displayName transfer:FALSE]; }