Compare commits

...
Sign in to create a new pull request.

56 commits

Author SHA1 Message Date
QuentinArguillere
3f2a804b88 Update changelog and podfile for 4.6.8 release 2022-10-27 10:47:21 +02:00
QuentinArguillere
c883f70f10 Fix changelog 2022-09-20 16:56:44 +02:00
QuentinArguillere
023c837423 Update changeling and pod file for 4.6.7 2022-09-20 16:50:48 +02:00
QuentinArguillere
7c0f7ed43f Fix xcode14 + ios16 build 2022-09-19 15:55:54 +02:00
Christophe Deschamps
6bcdbe79c9 Merge branch 'release/4.6' of gitlab.linphone.org:BC/public/linphone-iphone into release/4.6 2022-09-01 17:47:37 +02:00
Christophe Deschamps
fef60bd382 Removed debug message 2022-09-01 17:47:31 +02:00
QuentinArguillere
5e1a3fca50 Update changelog, podfile and product version for 4.6.6 release 2022-09-01 15:26:46 +02:00
Christophe Deschamps
661132c93d IMDM cell cosmetics 2022-09-01 09:57:25 +02:00
Christophe Deschamps
69e4e8c374 Cosmetic on dots menu & micro icon on conversation view 2022-09-01 09:57:25 +02:00
QuentinArguillere
92e973ba13 Remove line committed by mistake 2022-08-29 17:11:29 +02:00
QuentinArguillere
5f2496aab0 Put set LDAP search loading view to be semi transparent, and add a message when more results are available 2022-08-26 16:34:53 +02:00
QuentinArguillere
9524dfd45f When destroying the linphone core, also destroy the magic search singleton This fixes bugs that would break the LDAP contact search after a remote provisioning. 2022-07-26 16:36:22 +02:00
QuentinArguillere
0c0e04d7d2 To avoid possible race condition, reload contacts in the global state change callbacks 2022-07-26 15:13:47 +02:00
QuentinArguillere
e0b45807fc Updated changelog for 4.6.5 2022-06-30 13:51:00 +02:00
QuentinArguillere
3507b355ed Avoid crash in settings menu for iOS < 13.0 2022-06-28 17:18:10 +02:00
QuentinArguillere
b75147cfd9 Disable voip & remote push notification by default when using the assistant to login with an external sip account 2022-06-28 16:22:04 +02:00
QuentinArguillere
f5bb899aa9 Always display LDAP contacts in priority. If a local contact matches, partially or totally, the LDAP contact, still display both. 2022-06-27 11:42:24 +02:00
QuentinArguillere
eb0929899a Always Hide edit/delete buttons for LDAP contact details view (could still appear if accessed through a “previous” button) 2022-06-27 11:41:42 +02:00
QuentinArguillere
3bd0987a78 Fix typo in LDAP.plist file 2022-06-24 16:57:13 +02:00
QuentinArguillere
fca545eb24 Fix typos in LDAP settings menu that would cause a partial loss of the configuration when exiting the menu 2022-06-24 16:17:58 +02:00
QuentinArguillere
05789b6767 Fix bugs when rotating from portrait to landscape mode : edit/delete action shown as available for LDAP contacts, or Contact Name appearing despite being currently in edit mode 2022-06-23 12:08:46 +02:00
QuentinArguillere
d29e46ba60 Fix bug that could cause a clipping/hiding of a contact name depending on the phone orientation 2022-06-23 11:23:44 +02:00
QuentinArguillere
9c670a3200 When hitting the “back” button on a contact details view, redirect to the ContactListView by default. Only return to the history details view if we specifically came from there. 2022-06-22 12:29:31 +02:00
QuentinArguillere
7cb6b4e2c5 Now allow duplicate contacts to be displayed (useful if you have a local contact AND the contact exists with more informations in a LDAP server) 2022-06-22 10:47:56 +02:00
QuentinArguillere
62af703582 Fix GUI when remote provisioning fails due to the user already having accounts 2022-06-21 18:25:15 +02:00
QuentinArguillere
191cc5a234 Reload the table data after clearing the arrays to avoid potential crash due to asynchronous call to reloadData 2022-06-08 14:44:19 +02:00
QuentinArguillere
52ec19a663 Remove unneeded @Synchronized, fix indent 2022-06-08 14:44:19 +02:00
QuentinArguillere
4e55653146 update changelog and podfile for 4.6.4 2022-06-08 10:16:28 +02:00
QuentinArguillere
51876c9c06 Fix crash that would occur when typing too fast in the chatroom creation search bar (race condition), and fix possible infinite loop when having some specific conditions in the phone contacts 2022-06-06 17:14:06 +02:00
QuentinArguillere
ebbc94fccf Use the account’s identity rather than a generic hard coded string as basis when synchronizing params. This fixes the loss of “sips” identity when exiting the settings menu. 2022-06-03 15:27:27 +02:00
QuentinArguillere
f25128901d Upgrade to 4.6.3 2022-06-02 16:49:15 +02:00
QuentinArguillere
f7bd5fcc5f Update changelog and Podfile sdk version 2022-06-02 16:04:09 +02:00
QuentinArguillere
038343812c Avoid potential crash in canAdmniEphemeral chatroom function 2022-06-02 12:13:54 +02:00
QuentinArguillere
2f3eb503b0 Re-create french translation file 2022-05-25 17:11:19 +02:00
Christophe Deschamps
74f0b2afba - Avoids reloading chat messages table view without reloading data first
- Removes redundant chat message reloading in configureForRoom
2022-05-25 17:06:18 +02:00
Christophe Deschamps
614c8e3ac2 Fix account not persisted after login into linphon 2022-05-25 17:06:18 +02:00
QuentinArguillere
bc2719a659 Add “Contact” part in the settings, allowing the addition, deletion and edition of LDAP configurations 2022-05-09 16:37:22 +02:00
QuentinArguillere
00728f3a04 Update contact list and chat conversation creation view to use magic search 2022-05-04 13:49:58 +02:00
QuentinArguillere
78f33f6a93 Remove includes of linphoneapp-swift.h in *.h files 2022-05-04 13:49:58 +02:00
QuentinArguillere
359afa1a5a Disable reply actions for events that are not ChatMessages 2022-04-27 15:34:07 +02:00
QuentinArguillere
2b108ffd61 Update podfile to point to non-beta sdk version 2022-03-24 10:06:34 +01:00
QuentinArguillere
35d4c7e963 Lower deployment target from 13.0 to 11.0 2022-03-21 14:53:55 +01:00
QuentinArguillere
474355bc9e Replace use of deprecated function “linphone_chat_room_has_been_left” with “linphone_chat_room_is_read_only” 2022-03-21 12:05:03 +01:00
QuentinArguillere
bd34122fad Prevent screen from turning off while recording a voice message 2022-03-07 16:04:47 +01:00
QuentinArguillere
49b54f9db2 Update to 4.6.2 2022-03-07 14:16:32 +01:00
QuentinArguillere
3b58130e3a Upgrade to 4.6.1 2022-03-04 14:16:41 +01:00
Danmei Chen
00144598db fix reply message in basic chat rooms 2022-02-15 11:05:03 +01:00
Danmei Chen
3fd3286f94 fix settings for media encryption: media encryption mandatory uncheck itself if media encryption is none 2022-02-11 18:19:36 +01:00
Danmei Chen
a712a2d6e5 fix dark mode for composeIndicatorView of chatroom 2022-02-11 15:07:55 +01:00
Danmei Chen
c5bbc60532 fix send multiparts message in basic chatroom 2022-02-11 14:35:46 +01:00
Danmei Chen
cdc09fcd8f fix dark mode for SettingsView 2022-02-11 10:24:13 +01:00
Danmei Chen
e1c89db7d8 fix dark mode for UIChatCreateCollectionViewCell 2022-02-10 17:33:54 +01:00
Danmei Chen
445162792b fix local conference crash when pausing/resuming 2022-02-10 17:02:34 +01:00
Danmei Chen
b902216921 fix contact view : chat with contact and back to contact 2022-02-10 16:38:15 +01:00
Danmei Chen
f9bddedf79 fix chatroominfoview crash by reconfiguring the chatroom after entering background puis foreground 2022-02-10 16:17:55 +01:00
Danmei Chen
0fdde4a56d fix duplicate push authorization requests on install 2022-02-10 14:59:31 +01:00
59 changed files with 1431 additions and 530 deletions

View file

@ -9,7 +9,75 @@ Group changes to describe their impact on the project, as follows:
Removed for deprecated features removed in this release.
Fixed for any bug fixes.
Security to invite users to upgrade in case of vulnerabilities.
## [4.6.7] - 2021-27-10
### Fixed
- Fixed bug that would make audio messages unplayable on iOS 16
### Changed
- Update linphone SDK to 5.1.67
## [4.6.7] - 2021-20-09
### Changed
- Update linphone SDK to 5.1.62
## [4.6.6] - 2021-01-09
### Changed
- Update linphone SDK to 5.1.57
### Fixed
- Fix bug that could cause video quality to be worse than it should
- Fix possible crash when receiving an incoming call
- Fix crash when no account is marked as being the "default" one
- Various fixes in Contacts view and LDAP search
## [4.6.5] - 2021-30-06
### Changed
- Update linphone SDK to 5.1.46
### Fixed
- Application GUI would sometimes break after a fail remote provisioning
- Various fixes in Contacts view and LDAP search
- Fix possible crash when entering background
## [4.6.4] - 2021-08-06
### Changed
- Update linphone SDK to 5.1.42
### Fixed
- Prevent possible application freeze and crash when creating a new chatroom, depending on the phone's contacts.
## [4.6.3] - 2021-02-06
### Added
- New "Contacts" menu in the settings, which allows the use of LDAP configurations
- Using new MagicSearch API to improve contacts list performances, and search contacts using LDAP if appropriate
### Changed
- Update linphone SDK to 5.1.41
### Fixed
- Prevent read-only 1-1 chat room
- Small quality of life fixes for voice recording messages
- Display bug when changing audio device
## [4.6.2] - 2021-07-03
### Fixed
- Bug preventing the activation of the phone speaker during calls
- Bug with "reply" feature in chatrooms
- Bug causing IMDNs to be missing in some chatrooms
- Update linphone SDK to 5.1.7
## [4.6.1] - 2021-04-03
### Fixed
- Crash in chatroom info view after entering background and re-entering foreground
- Crash in local call conferences when pausing/resuming
- Hard to see text (written in black) on dark mode
- Removed duplicate push authorization request pop up on install
## [4.6.0] - 2021-31-02
### Added

View file

@ -542,6 +542,9 @@ static UICompositeViewDescription *compositeDescription = nil;
[self displayAssistantConfigurationError];
[LinphoneManager.instance migrationPerAccount];
linphone_config_sync(LinphoneManager.instance.configDb);
}
- (void)displayAssistantConfigurationError {
@ -1581,10 +1584,11 @@ UIColor *previousColor = (UIColor*)[sender backgroundColor]; \
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {}];
handler:^(UIAlertAction * action) {}];
[errView addAction:defaultAction];
[self presentViewController:errView animated:YES completion:nil];
_waitView.hidden = TRUE;
} else {
linphone_core_set_provisioning_uri(LC, [self addSchemeToProvisiionninUriIMissing:[self findTextField:ViewElement_URL].text].UTF8String);
[self resetLiblinphone:TRUE];

View file

@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -29,23 +32,23 @@
</connections>
</tapGestureRecognizer>
<view contentMode="scaleToFill" id="WKv-mw-S2B" userLabel="iphone6MetricsView">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5">
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
<rect key="frame" x="0.0" y="42" width="414" height="788"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view alpha="0.90000000000000002" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7" userLabel="topBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="66"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="66"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="d5Q-XR-FNz" userLabel="switchView">
<rect key="frame" x="225" y="0.0" width="150" height="66"/>
<rect key="frame" x="248" y="0.0" width="166" height="66"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="r3z-SM-lMq" userLabel="allButton" customClass="UIInterfaceStyleButton">
<rect key="frame" x="0.0" y="0.0" width="75" height="66"/>
<rect key="frame" x="0.0" y="0.0" width="83" height="66"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="All contacts filter"/>
<fontDescription key="fontDescription" type="system" pointSize="9"/>
@ -65,11 +68,11 @@
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="color_A.png" translatesAutoresizingMaskIntoConstraints="NO" id="ibu-Ra-oZO" userLabel="selectedButtonImage">
<rect key="frame" x="0.0" y="63" width="75" height="3"/>
<rect key="frame" x="0.0" y="63" width="83" height="3"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8lQ-fv-INK" userLabel="sipButton" customClass="UIInterfaceStyleButton">
<rect key="frame" x="75" y="0.0" width="75" height="66"/>
<rect key="frame" x="83" y="0.0" width="83" height="66"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Linphone contacts filter"/>
<fontDescription key="fontDescription" type="system" pointSize="9"/>
@ -89,7 +92,7 @@
</subviews>
</view>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fNt-yb-wsf" userLabel="backButton" customClass="UIInterfaceStyleButton">
<rect key="frame" x="0.0" y="0.0" width="75" height="66"/>
<rect key="frame" x="0.0" y="0.0" width="82" height="66"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Back"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
@ -143,7 +146,7 @@
</subviews>
</view>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rBc-dQ-eIj" userLabel="nextButton" customClass="UIInterfaceStyleButton">
<rect key="frame" x="300" y="0.0" width="75" height="66"/>
<rect key="frame" x="331" y="0.0" width="83" height="66"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Back">
<bool key="isElement" value="YES"/>
@ -160,18 +163,18 @@
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="secondarySystemBackgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" systemColor="secondarySystemBackgroundColor"/>
</view>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="KRQ-Fm-3cQ" userLabel="addedContacts" customClass="UICollectionView">
<rect key="frame" x="8" y="110" width="359" height="70"/>
<rect key="frame" x="8" y="110" width="398" height="70"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<accessibility key="accessibilityConfiguration" label="addedContacts"/>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" style="plain" separatorStyle="default" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="6">
<rect key="frame" x="5" y="178" width="365" height="381"/>
<rect key="frame" x="5" y="178" width="403" height="610"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="separatorColor" red="0.67030966281890869" green="0.71867996454238892" blue="0.75078284740447998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<outlet property="dataSource" destination="4" id="11"/>
@ -179,7 +182,7 @@
</connections>
</tableView>
<searchBar contentMode="redraw" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Rd9-hK-nqR" userLabel="Contact address">
<rect key="frame" x="0.0" y="66" width="375" height="44"/>
<rect key="frame" x="0.0" y="66" width="414" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no"/>
<connections>
@ -187,19 +190,37 @@
</connections>
</searchBar>
<view hidden="YES" tag="8" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ztm-hK-aBp" userLabel="waitView">
<rect key="frame" x="0.0" y="0.0" width="375" height="559"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="788"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<activityIndicatorView opaque="NO" tag="9" contentMode="scaleToFill" fixedFrame="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="nqH-qD-vgE" userLabel="activityIndicatorView">
<rect key="frame" x="179" y="267" width="20" height="20"/>
<rect key="frame" x="199" y="380" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<gestureRecognizers/>
</view>
<view hidden="YES" contentMode="scaleToFill" id="Vhn-Z4-Z4Q" userLabel="loadingView">
<rect key="frame" x="5" y="178" width="403" height="610"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loading contacts..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tQD-oL-wLO">
<rect key="frame" x="100" y="10" width="145" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" animating="YES" style="medium" id="xS4-I7-COE">
<rect key="frame" x="75" y="10" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -209,6 +230,7 @@
<extendedEdge key="edgesForExtendedLayout"/>
<nil key="simulatedStatusBarMetrics"/>
<connections>
<outlet property="loadingView" destination="Vhn-Z4-Z4Q" id="FvB-Bn-31o"/>
<outlet property="searchBar" destination="Rd9-hK-nqR" id="rLn-7q-CwC"/>
<outlet property="view" destination="6" id="13"/>
<outlet property="waitView" destination="Ztm-hK-aBp" id="uSB-4b-n7e"/>
@ -233,5 +255,11 @@
<image name="security_toogle_button.png" width="21" height="21"/>
<image name="security_toogle_icon_green.png" width="33.599998474121094" height="38.400001525878906"/>
<image name="security_toogle_icon_grey.png" width="33.599998474121094" height="38.400001525878906"/>
<systemColor name="secondarySystemBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -394,6 +394,7 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
<tableView hidden="YES" clipsSubviews="YES" tag="6992" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="gdT-1Q-vU2" userLabel="popupMenu">
<rect key="frame" x="142" y="66" width="273" height="132"/>

View file

@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -9,7 +12,10 @@
<connections>
<outlet property="addButton" destination="6" id="91"/>
<outlet property="allButton" destination="4" id="27"/>
<outlet property="ldapMoreResultsLabel" destination="cDH-mL-cHP" id="3d9-gp-Hog"/>
<outlet property="linphoneButton" destination="5" id="31"/>
<outlet property="loadingLabel" destination="qSa-Ba-dq9" id="CPa-pO-OQD"/>
<outlet property="loadingView" destination="CM2-Aq-Q3g" id="uie-SJ-TKf"/>
<outlet property="searchBar" destination="5jE-oF-d45" id="xfS-xo-2Bm"/>
<outlet property="selectedButtonImage" destination="A9k-KU-Dlm" id="4dX-pd-Y2D"/>
<outlet property="tableController" destination="TJG-JZ-YRR" id="0lt-gC-EOm"/>
@ -153,7 +159,7 @@
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="secondarySystemBackgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" systemColor="secondarySystemBackgroundColor"/>
</view>
<searchBar contentMode="redraw" fixedFrame="YES" showsCancelButton="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5jE-oF-d45" userLabel="searchBar">
<rect key="frame" x="0.0" y="66" width="375" height="44"/>
@ -166,7 +172,7 @@
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" style="plain" separatorStyle="default" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="zOo-FS-W6l" userLabel="tableView">
<rect key="frame" x="0.0" y="110" width="375" height="449"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<inset key="scrollIndicatorInsets" minX="0.0" minY="0.0" maxX="0.0" maxY="10"/>
<color key="separatorColor" red="0.67030966281890869" green="0.71867996454238892" blue="0.75078284740447998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
@ -174,19 +180,45 @@
<outlet property="delegate" destination="TJG-JZ-YRR" id="V1N-gI-U4J"/>
</connections>
</tableView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="More results are available, refine search to see them" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cDH-mL-cHP" userLabel="ldapMoreResultsLabel">
<rect key="frame" x="8" y="110" width="359" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="No contact found in your address book" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JR3-k7-gVP" userLabel="emptyTableLabel">
<rect key="frame" x="0.0" y="110" width="375" height="449"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view hidden="YES" alpha="0.80000000000000004" contentMode="scaleToFill" id="CM2-Aq-Q3g">
<rect key="frame" x="0.0" y="110" width="375" height="449"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" animating="YES" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="udQ-TE-UlZ">
<rect key="frame" x="80" y="8" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</activityIndicatorView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loading contacts..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qSa-Ba-dq9">
<rect key="frame" x="108" y="8" width="145" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</subviews>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<point key="canvasLocation" x="6.5217391304347831" y="142.29910714285714"/>
<point key="canvasLocation" x="5.7971014492753632" y="141.96428571428569"/>
</view>
<tableViewController id="TJG-JZ-YRR" userLabel="tableController" customClass="ContactsListTableView">
<connections>
@ -218,5 +250,11 @@
<image name="deselect_all.png" width="43.200000762939453" height="43.200000762939453"/>
<image name="select_all_default.png" width="43.200000762939453" height="43.200000762939453"/>
<image name="select_all_disabled.png" width="43.200000762939453" height="43.200000762939453"/>
<systemColor name="secondarySystemBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "CallConferenceTableView.h"
#import "UICallConferenceCell.h"
#import "LinphoneManager.h"

View file

@ -771,7 +771,6 @@ import AVFoundation
return false
}
let result = isInConference() && (getConference()?.currentParams?.isVideoEnabled == true || core.currentCall?.currentParams?.videoEnabled == true)
NSLog("cdes \(result) \(core.currentCall?.currentParams?.videoEnabled)")
return result
}

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "CallOutgoingView.h"
#import "PhoneMainView.h"

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import <AddressBook/AddressBook.h>
#import <AudioToolbox/AudioToolbox.h>
#import <OpenGLES/EAGL.h>

View file

@ -22,13 +22,14 @@
@interface ChatConversationCreateTableView : UITableViewController <UISearchBarDelegate>
@property(nonatomic) Boolean allFilter;
@property(nonatomic) Boolean notFirstTime;
@property(nonatomic) Boolean reloadMagicSearch;
@property(nonatomic, strong) NSMutableArray *contactsGroup;
@property(nonatomic) LinphoneMagicSearch *magicSearch;
@property(weak, nonatomic) IBOutlet UISearchBar *searchBar;
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
@property (weak, nonatomic) IBOutlet UIButton *controllerNextButton;
@property (weak, nonatomic) IBOutlet UIView *waitView;
@property (weak, nonatomic) IBOutlet UIView *loadingView;
@property(nonatomic) Boolean isForEditing;
@property(nonatomic) Boolean isGroupChat;

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "ChatConversationCreateTableView.h"
#import "UIChatCreateCell.h"
#import "LinphoneManager.h"
@ -28,14 +29,18 @@
@property(nonatomic, strong) NSMutableArray *addresses;
@property(nonatomic, strong) NSMutableArray *phoneOrAddr;
@property(nonatomic, strong) NSMutableArray *addressesCached;
@property(readonly, nonatomic) NSMutableDictionary *ldapContactAddressBookMap;
@end
@implementation ChatConversationCreateTableView
- (void)viewWillAppear:(BOOL)animated {
if (!_ldapContactAddressBookMap) {
_ldapContactAddressBookMap = [NSMutableDictionary dictionary];
}
[super viewWillAppear:animated];
_magicSearch = linphone_core_create_magic_search(LC);
int y = _contactsGroup.count > 0
? _collectionView.frame.origin.y + _collectionView.frame.size.height
: _searchBar.frame.origin.y + _searchBar.frame.size.height;
@ -53,6 +58,18 @@
_addresses = [[NSMutableArray alloc] initWithCapacity:LinphoneManager.instance.fastAddressBook.addressBookMap.allKeys.count];
_phoneOrAddr = [[NSMutableArray alloc] initWithCapacity:LinphoneManager.instance.fastAddressBook.addressBookMap.allKeys.count];
_addressesCached = [[NSMutableArray alloc] initWithCapacity:LinphoneManager.instance.fastAddressBook.addressBookMap.allKeys.count];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(onChatMagicSearchStarted:)
name:kLinphoneMagicSearchStarted
object:nil];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(onChatMagicSearchFinished:)
name:kLinphoneMagicSearchFinished
object:nil];
if(_notFirstTime) {
for(NSString *addr in _contactsGroup) {
[_collectionView registerClass:UIChatCreateCollectionViewCell.class forCellWithReuseIdentifier:addr];
@ -64,32 +81,31 @@
[_searchBar setText:@""];
[self searchBar:_searchBar textDidChange:_searchBar.text];
self.tableView.accessibilityIdentifier = @"Suggested addresses";
}
- (void) viewWillDisappear:(BOOL)animated {
[[NSNotificationCenter defaultCenter] removeObserver:self];
_notFirstTime = FALSE;
linphone_magic_search_unref(_magicSearch);
_magicSearch = NULL;
}
- (void) loadData {
[self reloadDataWithFilter:_searchBar.text];
- (void)onChatMagicSearchStarted:(NSNotification *)k {
_loadingView.hidden = FALSE;
}
- (void)onChatMagicSearchFinished:(NSNotification *)k {
[self buildChatContactTable];
_loadingView.hidden = TRUE;
}
- (void)reloadDataWithFilter:(NSString *)filter {
[_addresses removeAllObjects];
[_phoneOrAddr removeAllObjects];
[_addressesCached removeAllObjects];
if (!_magicSearch)
return;
bctbx_list_t *results = linphone_magic_search_get_contact_list_from_filter(_magicSearch, filter.UTF8String, _allFilter ? "" : "*");
- (void) buildChatContactTable {
bctbx_list_t *results = [MagicSearchSingleton.instance getLastSearchResults];
while (results) {
LinphoneSearchResult *result = results->data;
const LinphoneAddress *addr = linphone_search_result_get_address(result);
const char *phoneNumber = NULL;
const char *phoneNumber = NULL;
Contact *contact = nil;
char *uri = nil;
NSString *address = nil;
@ -99,7 +115,8 @@
contact = [LinphoneManager.instance.fastAddressBook.addressBookMap objectForKey:[FastAddressBook normalizeSipURI:address]];
}
if (!addr || (!contact && linphone_search_result_get_friend(result))) {
const LinphoneFriend* friend = linphone_search_result_get_friend(result);
if (!addr || (!contact && friend)) {
phoneNumber = linphone_search_result_get_phone_number(result);
if (!phoneNumber) {
results = results->next;
@ -117,24 +134,51 @@
addr = linphone_account_normalize_sip_uri(account, normalizedPhoneNumber);
uri = linphone_address_as_string_uri_only(addr);
address = [NSString stringWithUTF8String:uri];
contact = [[Contact alloc] initWithFriend:friend];
[contact setCreatedFromLdap:TRUE];
[_ldapContactAddressBookMap setObject:contact forKey:address];
}
}
if (!addr) {
results = results->next;
continue;
}
ms_free(uri);
ms_free(uri);
[_addresses addObject:address];
[_phoneOrAddr addObject:phoneNumber ? [NSString stringWithUTF8String:phoneNumber] : address];
[_addressesCached addObject:[NSString stringWithFormat:@"%d",linphone_search_result_get_capabilities(result)]];
[_addressesCached addObject:[NSString stringWithFormat:@"%d",linphone_search_result_get_capabilities(result)]];
results = results->next;
}
[self.tableView reloadData];
_reloadMagicSearch = FALSE;
}
- (void) loadData {
[self reloadDataWithFilter:_searchBar.text];
}
- (void)reloadDataWithFilter:(NSString *)filter {
[_addresses removeAllObjects];
[_phoneOrAddr removeAllObjects];
[_addressesCached removeAllObjects];
[_ldapContactAddressBookMap removeAllObjects];
[self.tableView reloadData];
_reloadMagicSearch = _reloadMagicSearch || [filter length]==0 || ![[MagicSearchSingleton.instance currentFilter] isEqualToString:filter];
[MagicSearchSingleton.instance setCurrentFilter:filter];
if (_reloadMagicSearch) {
[MagicSearchSingleton.instance searchForContactsWithDomain:_allFilter ? @"" : @"*" sourceFlags:LinphoneMagicSearchSourceAll clearCache:FALSE];
} else {
[self buildChatContactTable];
}
}
#pragma mark - TableView methods
@ -160,6 +204,10 @@
NSString *key = [_addresses objectAtIndex:indexPath.row];
NSString *phoneOrAddr = [_phoneOrAddr objectAtIndex:indexPath.row];
Contact *contact = [LinphoneManager.instance.fastAddressBook.addressBookMap objectForKey:[FastAddressBook normalizeSipURI:key]];
if (!contact) {
contact = [_ldapContactAddressBookMap objectForKey:key];
}
const LinphonePresenceModel *model = contact.friend ? linphone_friend_get_presence_model(contact.friend) : NULL;
Boolean linphoneContact = [FastAddressBook contactHasValidSipDomain:contact]
|| (model && linphone_presence_model_get_basic_status(model) == LinphonePresenceBasicStatusOpen);
@ -173,7 +221,7 @@
BOOL greyCellForEncryptedChat = _isEncrypted ? capabilities > 1 : TRUE;
BOOL greyCellForGroupChat = _isGroupChat ? capabilities > 0 : TRUE;
cell.userInteractionEnabled = cell.greyView.hidden = greyCellForEncryptedChat && greyCellForGroupChat;
cell.displayNameLabel.text = [FastAddressBook displayNameForAddress:addr];
cell.displayNameLabel.text = [contact createdFromLdap] ? [contact displayName] : [FastAddressBook displayNameForAddress:addr];
char *str = linphone_address_as_string(addr);
cell.addressLabel.text = linphoneContact ? [NSString stringWithUTF8String:str] : phoneOrAddr;
ms_free(str);
@ -275,17 +323,11 @@
searchBar.showsCancelButton = (searchText.length > 0);
[self reloadDataWithFilter:searchText];
if ([searchText isEqualToString:@""]) {
if (_magicSearch)
linphone_magic_search_reset_search_cache(_magicSearch);
[_searchBar resignFirstResponder];
}
}
- (BOOL)searchBar:(UISearchBar *)searchBar shouldChangeTextInRange:(NSRange)range replacementText:(nonnull NSString *)text {
if (text.length < _searchBar.text.length && _magicSearch)
linphone_magic_search_reset_search_cache(_magicSearch);
return TRUE;
}
@ -302,9 +344,6 @@
}
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
if (_magicSearch)
linphone_magic_search_reset_search_cache(_magicSearch);
[searchBar resignFirstResponder];
}

View file

@ -188,20 +188,20 @@ typedef enum { ContactsAll, ContactsLinphone, ContactsMAX } ContactsCategory;
- (void)changeView:(ContactsCategory)view {
CGRect frame = _selectedButtonImage.frame;
if (_tableController.magicSearch)
linphone_magic_search_reset_search_cache(_tableController.magicSearch);
if (view == ContactsAll && !_allButton.selected) {
frame.origin.x = _allButton.frame.origin.x;
_allButton.selected = TRUE;
_linphoneButton.selected = FALSE;
_tableController.allFilter = TRUE;
_tableController.reloadMagicSearch = TRUE;
[_tableController loadData];
} else if (view == ContactsLinphone && !_linphoneButton.selected) {
frame.origin.x = _linphoneButton.frame.origin.x;
_linphoneButton.selected = TRUE;
_allButton.selected = FALSE;
_tableController.allFilter = FALSE;
_tableController.reloadMagicSearch = TRUE;
[_tableController loadData];
}
_selectedButtonImage.frame = frame;

View file

@ -34,6 +34,7 @@
@property(nonatomic) NSString *oldSubject;
@property(nonatomic) LinphoneChatRoom *room;
@property(nonatomic) LinphoneChatRoomCbs *chatRoomCbs;
@property(nonatomic) const char *peerAddress;
@property (weak, nonatomic) IBOutlet UIIconButton *nextButton;
@property (weak, nonatomic) IBOutlet UIRoundBorderedButton *quitButton;
@ -49,6 +50,4 @@
- (IBAction)onBackClick:(id)sender;
- (IBAction)onQuitClick:(id)sender;
- (void)removeCallbacks;
@end

View file

@ -83,12 +83,30 @@ static UICompositeViewDescription *compositeDescription = nil;
_oldContacts = [[NSMutableArray alloc] init];
_room = NULL;
_chatRoomCbs = NULL;
_peerAddress = NULL;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
_waitView.hidden = YES;
[self configure];
[NSNotificationCenter.defaultCenter addObserver:self
selector:@selector(onLinphoneCoreReady:)
name:kLinphoneGlobalStateUpdate
object:nil];
}
- (void)viewWillDisappear:(BOOL)animated {
[NSNotificationCenter.defaultCenter removeObserver:self];
if (!_room || !_chatRoomCbs)
return;
linphone_chat_room_remove_callbacks(_room, _chatRoomCbs);
_chatRoomCbs = NULL;
}
- (void)configure {
if (_create)
_room = NULL;
@ -96,7 +114,7 @@ static UICompositeViewDescription *compositeDescription = nil;
? [NSString stringWithUTF8String:linphone_chat_room_get_subject(_room)]
: @"";
_nextButton.enabled = _nameLabel.text.length > 0 && _contacts.count > 0;
LinphoneParticipant *me = _room && !linphone_chat_room_has_been_left(_room)
LinphoneParticipant *me = _room && !linphone_chat_room_is_read_only(_room)
? linphone_chat_room_get_me(_room)
: NULL;
_imAdmin = me
@ -131,20 +149,20 @@ static UICompositeViewDescription *compositeDescription = nil;
[_tableView reloadData];
}
- (void)viewWillDisappear:(BOOL)animated {
[self removeCallbacks];
}
- (void)removeCallbacks {
if (!_room || !_chatRoomCbs)
return;
linphone_chat_room_remove_callbacks(_room, _chatRoomCbs);
_chatRoomCbs = NULL;
}
#pragma mark - next functions
- (void)onLinphoneCoreReady:(NSNotification *)notif {
if ((LinphoneGlobalState)[[[notif userInfo] valueForKey:@"state"] integerValue] == LinphoneGlobalOn) {
if (!_create && _peerAddress) {
LinphoneAddress *peerAddr = linphone_core_create_address([LinphoneManager getLc], _peerAddress);
if (peerAddr) {
_room = linphone_core_get_chat_room([LinphoneManager getLc], peerAddr);
}
[self configure];
}
}
}
- (void)onCreate {
bctbx_list_t *addresses = NULL;
for (NSString *addr in _contacts) {

View file

@ -415,6 +415,10 @@ static const CGFloat MESSAGE_SPACING_PERCENTAGE = 1.f;
LinphoneEventLog *event = [[eventList objectAtIndex:indexPath.row] pointerValue];
if (linphone_event_log_get_type(event) != LinphoneEventLogTypeConferenceChatMessage) {
return [UISwipeActionsConfiguration configurationWithActions:@[]];
}
UIContextualAction *replyAction = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleNormal
title:NSLocalizedString(@"Reply", nil)
handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {

View file

@ -32,7 +32,6 @@
#import "UIImageViewDeletable.h"
#import "UIConfirmationDialog.h"
#import "UIInterfaceStyleButton.h"
#import "linphoneapp-Swift.h"
#import "UIChatReplyBubbleView.h"
#include "linphone/linphonecore.h"

View file

@ -19,6 +19,7 @@
#import <Photos/PHAssetChangeRequest.h>
#import "linphoneapp-Swift.h"
#import "ChatConversationView.h"
#import "PhoneMainView.h"
#import "Utils.h"
@ -194,7 +195,8 @@ static UICompositeViewDescription *compositeDescription = nil;
_vrInnerView.layer.masksToBounds = YES;
_vrWaveMaskPlayer.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"color_L"]]; // rgba(1,88,7,0.2);
_showVoiceRecorderView = false;
_toggleMenuButton.imageView.contentMode = UIViewContentModeScaleAspectFit;
_toggleRecord.imageView.contentMode = UIViewContentModeScaleAspectFit;
}
- (void)refreshData {
@ -304,6 +306,7 @@ static UICompositeViewDescription *compositeDescription = nil;
[NSNotificationCenter.defaultCenter removeObserver:self];
PhoneMainView.instance.currentRoom = NULL;
[[UIApplication sharedApplication] setIdleTimerDisabled:false];
}
- (void)removeCallBacks {
@ -382,7 +385,9 @@ static UICompositeViewDescription *compositeDescription = nil;
BOOL fileSharingEnabled = linphone_core_get_file_transfer_server(LC) != NULL;
[_pictureButton setEnabled:fileSharingEnabled];
[self callUpdateEvent:nil];
[self updateSuperposedButtons];
_toggleRecord.enabled = linphone_core_get_calls_nb(LC) == 0;
PhoneMainView.instance.currentRoom = _chatRoom;
if (isOneToOne) {
bctbx_list_t *participants = linphone_chat_room_get_participants(_chatRoom);
@ -424,13 +429,13 @@ static UICompositeViewDescription *compositeDescription = nil;
_messageField.editable = TRUE;
_pictureButton.enabled = TRUE;
_messageView.userInteractionEnabled = TRUE;
if (linphone_chat_room_has_been_left(_chatRoom)) {
if (linphone_chat_room_is_read_only(_chatRoom)) {
linphone_chat_room_add_participant(_chatRoom, linphone_participant_get_address(linphone_chat_room_get_me(_chatRoom)));
}
} else {
_messageField.editable = !linphone_chat_room_has_been_left(_chatRoom);
_pictureButton.enabled = !linphone_chat_room_has_been_left(_chatRoom);
_messageView.userInteractionEnabled = !linphone_chat_room_has_been_left(_chatRoom);
_messageField.editable = !linphone_chat_room_is_read_only(_chatRoom);
_pictureButton.enabled = !linphone_chat_room_is_read_only(_chatRoom);
_messageView.userInteractionEnabled = !linphone_chat_room_is_read_only(_chatRoom);
}
}
@ -529,7 +534,9 @@ static UICompositeViewDescription *compositeDescription = nil;
LinphoneChatMessage *msg = rootMessage;
BOOL basic = [ChatConversationView isBasicChatRoom:_chatRoom];
if (!basic && message && message.length > 0) {
const LinphoneAccountParams *params = linphone_account_get_params(linphone_core_get_default_account(LC));
BOOL cpimEnabled = linphone_account_params_cpim_in_basic_chat_room_enabled(params);
if ((!basic || cpimEnabled) && message && message.length > 0) {
linphone_chat_message_add_utf8_text_content(msg, message.UTF8String);
}
@ -542,7 +549,7 @@ static UICompositeViewDescription *compositeDescription = nil;
linphone_chat_message_send(msg);
}
if (basic && message && message.length > 0) {
if (basic && !cpimEnabled && message && message.length > 0) {
linphone_chat_message_send(linphone_chat_room_create_message_from_utf8(_chatRoom, message.UTF8String));
}
@ -746,8 +753,7 @@ static UICompositeViewDescription *compositeDescription = nil;
#pragma mark - Action Functions
- (IBAction)onBackClick:(id)event {
[_tableController setChatRoom:NULL];
[PhoneMainView.instance popToView:ChatsListView.compositeViewDescription];
[PhoneMainView.instance popCurrentView];
}
- (IBAction)onEditClick:(id)event {
@ -783,10 +789,10 @@ static UICompositeViewDescription *compositeDescription = nil;
} else {
int i = 0;
for (i = 0; i < [_fileContext count]-1; ++i) {
[self startUploadData:[_fileContext.datasArray objectAtIndex:i] withType:[_fileContext.typesArray objectAtIndex:i] withName:[_fileContext.namesArray objectAtIndex:i] andMessage:NULL rootMessage:rootMessage];
[self startUploadData:[_fileContext.datasArray objectAtIndex:i] withType:[_fileContext.typesArray objectAtIndex:i] withName:[_fileContext.namesArray objectAtIndex:i] andMessage:NULL rootMessage:NULL];
}
if (isOneToOne) {
[self startUploadData:[_fileContext.datasArray objectAtIndex:i] withType:[_fileContext.typesArray objectAtIndex:i] withName:[_fileContext.namesArray objectAtIndex:i] andMessage:NULL rootMessage:rootMessage];
[self startUploadData:[_fileContext.datasArray objectAtIndex:i] withType:[_fileContext.typesArray objectAtIndex:i] withName:[_fileContext.namesArray objectAtIndex:i] andMessage:NULL rootMessage:NULL];
if (![[self.messageField text] isEqualToString:@""]) {
[self sendMessage:[_messageField text] withExterlBodyUrl:nil rootMessage:rootMessage];
}
@ -888,6 +894,7 @@ static UICompositeViewDescription *compositeDescription = nil;
view.oldAdmins = [admins mutableCopy];
view.oldSubject = [NSString stringWithUTF8String:linphone_chat_room_get_subject(_chatRoom) ?: LINPHONE_DUMMY_SUBJECT];
view.room = _chatRoom;
view.peerAddress = _peerAddress;
[PhoneMainView.instance changeCurrentView:view.compositeViewDescription];
}
@ -1645,6 +1652,8 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog
-(BOOL) canAdminEphemeral:(LinphoneChatRoom *)cr {
if (!cr) return FALSE;
// If ephemeral mode is DeviceManaged, then we don't need to check anything else
return (linphone_chat_room_params_get_ephemeral_mode(linphone_chat_room_get_current_params(cr)) == LinphoneChatRoomEphemeralModeDeviceManaged)
|| ( linphone_chat_room_has_capability(cr, LinphoneChatRoomCapabilitiesEphemeral) && linphone_chat_room_params_get_ephemeral_mode(linphone_chat_room_get_current_params(cr)) == LinphoneChatRoomEphemeralModeAdminManaged && linphone_participant_is_admin(linphone_chat_room_get_me(cr)));
@ -1688,7 +1697,7 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return (_chatRoom && [self canAdminEphemeral:_chatRoom]) ? 3 : 2;
return [self canAdminEphemeral:_chatRoom] ? 3 : 2;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@ -1753,6 +1762,7 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog
}
-(void) cancelVoiceRecording {
[[UIApplication sharedApplication] setIdleTimerDisabled:false];
_showVoiceRecorderView = false;
_toggleRecord.selected = false;
[self updateFramesInclRecordingAndReplyView];
@ -1769,6 +1779,7 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog
}
-(void) stopVoiceRecording {
[[UIApplication sharedApplication] setIdleTimerDisabled:false];
if (_voiceRecorder && linphone_recorder_get_state(_voiceRecorder) == LinphoneRecorderRunning) {
LOGI(@"[Chat Message Sending] Pausing / closing voice recorder");
linphone_recorder_pause(_voiceRecorder);
@ -1789,6 +1800,7 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog
}
-(void) startVoiceRecording {
[[UIApplication sharedApplication] setIdleTimerDisabled:true];
if (!_voiceRecorder)
[self createVoiceRecorder];

View file

@ -35,6 +35,7 @@
@property(nonatomic, strong) NSMutableArray *sipAddresses;
@property(nonatomic, strong) NSMutableArray *emails;
@property(nonatomic, strong) NSMutableArray *phones;
@property BOOL createdFromLdap;
@property BOOL added;
- (void)setAvatar:(UIImage *)avatar;

View file

@ -36,6 +36,7 @@
_person = acncontact;
_friend = afriend ? linphone_friend_ref(afriend) : NULL;
_added = FALSE;
_createdFromLdap = FALSE;
_phones = [[NSMutableArray alloc] init];
_sipAddresses = [[NSMutableArray alloc] init];
_emails = [[NSMutableArray alloc] init];

View file

@ -160,7 +160,7 @@
/*first and last name only when editting */
return (self.tableView.isEditing) ? 1 : 0;
} else if (section == ContactSections_Sip) {
return _contact.sipAddresses.count;
return _contact.createdFromLdap ? 0 : _contact.sipAddresses.count;
} else if (section == ContactSections_Number) {
return _contact.phones.count;
} else if (section == ContactSections_Email) {
@ -193,30 +193,30 @@
value = _contact.lastName;
[cell hideDeleteButton:YES];
} else if ([indexPath section] == ContactSections_Number) {
value = _contact.phones[indexPath.row];
[cell.editTextfield setKeyboardType:UIKeyboardTypePhonePad];
} else if ([indexPath section] == ContactSections_Sip) {
value = _contact.sipAddresses[indexPath.row];
LinphoneAddress *addr = NULL;
if ([LinphoneManager.instance
lpConfigBoolForKey:@"contact_display_username_only"] &&
(addr = linphone_core_interpret_url(LC, [value UTF8String]))) {
value =
[NSString stringWithCString:linphone_address_get_username(addr)
encoding:[NSString defaultCStringEncoding]];
linphone_address_destroy(addr);
}
[cell.editTextfield setKeyboardType:UIKeyboardTypeASCIICapable];
} else if ([indexPath section] == ContactSections_Email) {
value = _contact.emails[indexPath.row];
[cell.editTextfield setKeyboardType:UIKeyboardTypeEmailAddress];
}
if ([value hasPrefix:@" "])
value = [value substringFromIndex:1];
[cell setAddress:value];
value = _contact.phones[indexPath.row];
[cell.editTextfield setKeyboardType:UIKeyboardTypePhonePad];
} else if ([indexPath section] == ContactSections_Sip) {
value = _contact.sipAddresses[indexPath.row];
LinphoneAddress *addr = NULL;
if ([LinphoneManager.instance
lpConfigBoolForKey:@"contact_display_username_only"] &&
(addr = linphone_core_interpret_url(LC, [value UTF8String]))) {
value =
[NSString stringWithCString:linphone_address_get_username(addr)
encoding:[NSString defaultCStringEncoding]];
linphone_address_destroy(addr);
}
[cell.editTextfield setKeyboardType:UIKeyboardTypeASCIICapable];
} else if ([indexPath section] == ContactSections_Email) {
value = _contact.emails[indexPath.row];
[cell.editTextfield setKeyboardType:UIKeyboardTypeEmailAddress];
}
if ([value hasPrefix:@" "])
value = [value substringFromIndex:1];
[cell setAddress:value];
cell.contentView.userInteractionEnabled = false;
return cell;
return cell;
}
- (void)tableView:(UITableView *)tableView
@ -283,7 +283,7 @@
if (section == ContactSections_Number) {
text = NSLocalizedString(@"Phone numbers", nil);
addEntryName = NSLocalizedString(@"Add new phone number", nil);
} else if (section == ContactSections_Sip) {
} else if (section == ContactSections_Sip && !_contact.createdFromLdap) {
text = NSLocalizedString(@"SIP addresses", nil);
addEntryName = NSLocalizedString(@"Add new SIP address", nil);
} else if (section == ContactSections_Email &&

View file

@ -119,8 +119,8 @@
_contact = acontact;
_emptyLabel.hidden = (_contact != NULL);
_avatarImage.hidden = !_emptyLabel.hidden;
_deleteButton.hidden = !_emptyLabel.hidden;
_editButton.hidden = !_emptyLabel.hidden;
_deleteButton.hidden = !_emptyLabel.hidden || [_contact createdFromLdap];
_editButton.hidden = !_emptyLabel.hidden || [_contact createdFromLdap];
[_avatarImage setImage:[FastAddressBook imageForContact:_contact] bordered:NO withRoundedRadius:YES];
[ContactDisplay setDisplayNameLabel:_nameLabel forContact:_contact];
@ -284,6 +284,9 @@
if (IPAD && self.contact == NULL) {
_editButton.hidden = TRUE;
_deleteButton.hidden = TRUE;
} else if (self.contact != NULL && self.contact.createdFromLdap) {
_editButton.hidden = TRUE;
_deleteButton.hidden = TRUE;
}
PhoneMainView.instance.currentName = _nameLabel.text;
// Update presence for contact
@ -296,6 +299,7 @@
[_editButton setImage:[UIImage imageNamed:@"valid_default.png"] forState:UIControlStateSelected];
[self updateBackOrCancelButton];
[self recomputeTableViewSize:FALSE];
}
- (void)deviceOrientationDidChange:(NSNotification*)notif {
@ -310,9 +314,13 @@
}
}
if (self.contact != NULL && self.contact.createdFromLdap) {
_editButton.hidden = TRUE;
_deleteButton.hidden = TRUE;
}
_nameLabel.hidden = self.tableController.isEditing;
[self updateBackOrCancelButton];
[self recomputeTableViewSize:_editButton.hidden];
[self recomputeTableViewSize:self.tableController.isEditing];
}
- (void)viewWillDisappear:(BOOL)animated {
@ -408,10 +416,11 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)recomputeTableViewSize:(BOOL)editing {
CGRect frame = _tableController.tableView.frame;
frame.origin.y = _avatarImage.frame.size.height + _avatarImage.frame.origin.y;
if ([self viewIsCurrentlyPortrait] && !editing) {
frame.origin.y += _nameLabel.frame.size.height;
}
frame.origin.y = _nameLabel.frame.origin.y + _nameLabel.frame.size.height;
} else {
frame.origin.y = _avatarImage.frame.size.height + _avatarImage.frame.origin.y;
}
frame.size.height = _tableController.tableView.contentSize.height;
_tableController.tableView.frame = frame;
@ -514,11 +523,11 @@ static UICompositeViewDescription *compositeDescription = nil;
}
NSString* previous = [PhoneMainView.instance getPreviousViewName];
if ([previous isEqualToString:@"ContactsListView"] || [previous isEqualToString:@"ImagePickerView"]) {
ContactsListView *view = VIEW(ContactsListView);
if ([previous isEqualToString:@"HistoryDetailsView"]) {
HistoryDetailsView *view = VIEW(HistoryDetailsView);
[PhoneMainView.instance popToView:view.compositeViewDescription];
} else {
HistoryDetailsView *view = VIEW(HistoryDetailsView);
ContactsListView *view = VIEW(ContactsListView);
[PhoneMainView.instance popToView:view.compositeViewDescription];
}
}

View file

@ -28,9 +28,9 @@
@private
OrderedDictionary *addressBookMap;
}
@property(nonatomic) BOOL ongoing;
@property(atomic) BOOL reloadMagicSearch;
- (void)loadData;
- (void)loadSearchedData;
- (void)loadDataWithFilter:(NSString *)filter;
- (void)removeAllContacts;
@end

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "ContactsListTableView.h"
#import "UIContactCell.h"
#import "LinphoneManager.h"
@ -24,31 +25,33 @@
#import "Utils.h"
@implementation ContactsListTableView
NSArray *sortedAddresses;
#pragma mark - Lifecycle Functions
- (void)initContactsTableViewController {
addressBookMap = [[OrderedDictionary alloc] init];
sortedAddresses = [[NSArray alloc] init];
[NSNotificationCenter.defaultCenter
addObserver:self
selector:@selector(onAddressBookUpdate:)
name:kLinphoneAddressBookUpdate
object:nil];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(onAddressBookUpdate:)
name:CNContactStoreDidChangeNotification
object:nil];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(onAddressBookUpdate:)
name:CNContactStoreDidChangeNotification
object:nil];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(onMagicSearchFinished:)
name:kLinphoneMagicSearchFinished
object:nil];
}
- (void)onAddressBookUpdate:(NSNotification *)k {
if ((!_ongoing && (PhoneMainView.instance.currentView == ContactsListView.compositeViewDescription)) || (IPAD && PhoneMainView.instance.currentView == ContactDetailsView.compositeViewDescription)) {
if ((![MagicSearchSingleton.instance isSearchOngoing] && (PhoneMainView.instance.currentView == ContactsListView.compositeViewDescription)) || (IPAD && PhoneMainView.instance.currentView == ContactDetailsView.compositeViewDescription)) {
[self loadData];
}
}
- (void)onMagicSearchFinished:(NSNotification *)k {
[self buildContactTable];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (IPAD) {
@ -64,7 +67,7 @@ NSArray *sortedAddresses;
if (self) {
[self initContactsTableViewController];
}
_ongoing = FALSE;
_reloadMagicSearch = TRUE;
return self;
}
@ -114,118 +117,17 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) {
- (NSString *)displayNameForContact:(Contact *)person {
NSString *name = person.displayName;
if (name != nil && [name length] > 0 && ![name isEqualToString:NSLocalizedString(@"Unknown", nil)]) {
// Add the contact only if it fuzzy match filter too (if any)
if ([ContactSelection getNameOrEmailFilter] == nil ||
(ms_strcmpfuz([[[ContactSelection getNameOrEmailFilter] lowercaseString] UTF8String],
[[name lowercaseString] UTF8String]) == 0)) {
// Sort contacts by first letter. We need to translate the name to ASCII first, because of UTF-8
// issues. For instance expected order would be: Alberta(A tilde) before ASylvano.
NSData *name2ASCIIdata = [name dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *name2ASCII = [[NSString alloc] initWithData:name2ASCIIdata encoding:NSASCIIStringEncoding];
return name2ASCII;
}
// Sort contacts by first letter. We need to translate the name to ASCII first, because of UTF-8
// issues. For instance expected order would be: Alberta(A tilde) before ASylvano.
NSData *name2ASCIIdata = [name dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *name2ASCII = [[NSString alloc] initWithData:name2ASCIIdata encoding:NSASCIIStringEncoding];
return name2ASCII;
}
return NSLocalizedString(@"Unknown", nil);
}
- (void)loadData {
_ongoing = TRUE;
LOGI(@"====>>>> Load contact list - Start");
NSString* previous = [PhoneMainView.instance getPreviousViewName];
addressBookMap = [LinphoneManager.instance getLinphoneManagerAddressBookMap];
BOOL updated = [LinphoneManager.instance getContactsUpdated];
if(([previous isEqualToString:@"ContactsDetailsView"] && updated) || updated || [addressBookMap count] == 0){
[LinphoneManager.instance setContactsUpdated:FALSE];
@synchronized(addressBookMap) {
NSDictionary *allContacts = [[NSMutableDictionary alloc] initWithDictionary:LinphoneManager.instance.fastAddressBook.addressBookMap];
sortedAddresses = [[LinphoneManager.instance.fastAddressBook.addressBookMap allKeys] sortedArrayUsingComparator:^NSComparisonResult(id a, id b) {
Contact* first = [allContacts objectForKey:a];
Contact* second = [allContacts objectForKey:b];
if([[first.firstName lowercaseString] compare:[second.firstName lowercaseString]] == NSOrderedSame)
return [[first.lastName lowercaseString] compare:[second.lastName lowercaseString]];
else
return [[first.firstName lowercaseString] compare:[second.firstName lowercaseString]];
}];
LOGI(@"====>>>> Load contact list - Start 2 !!");
//Set all contacts from ContactCell to nil
for (NSInteger j = 0; j < [self.tableView numberOfSections]; ++j){
for (NSInteger i = 0; i < [self.tableView numberOfRowsInSection:j]; ++i)
{
[[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:j]] setContact:nil];
}
}
// Reset Address book
[addressBookMap removeAllObjects];
for (NSString *addr in sortedAddresses) {
Contact *contact = nil;
@synchronized(LinphoneManager.instance.fastAddressBook.addressBookMap) {
contact = [LinphoneManager.instance.fastAddressBook.addressBookMap objectForKey:addr];
}
BOOL add = true;
// Do not add the contact directly if we set some filter
if ([ContactSelection getSipFilter] ||
[ContactSelection emailFilterEnabled]) {
add = false;
}
if ([FastAddressBook contactHasValidSipDomain:contact]) {
add = true;
}else if (contact.friend &&
linphone_presence_model_get_basic_status(
linphone_friend_get_presence_model(
contact.friend)) ==
LinphonePresenceBasicStatusOpen) {
add = true;
}
if (!add && [ContactSelection emailFilterEnabled]) {
// Add this contact if it has an email
add = (contact.emails.count > 0);
}
NSMutableString *name = [[NSMutableString alloc] initWithString: [self displayNameForContact:contact]];
if (add && name != nil) {
NSString *firstChar = [[name substringToIndex:1] uppercaseString];
// Put in correct subAr
if ([firstChar characterAtIndex:0] < 'A' || [firstChar characterAtIndex:0] > 'Z') {
firstChar = @"#";
}
NSMutableArray *subAr = [addressBookMap objectForKey:firstChar];
if (subAr == nil) {
subAr = [[NSMutableArray alloc] init];
[addressBookMap insertObject:subAr forKey:firstChar selector:@selector(caseInsensitiveCompare:)];
}
NSUInteger idx = [subAr indexOfObject:contact inSortedRange:(NSRange){0, subAr.count} options:NSBinarySearchingInsertionIndex usingComparator:^NSComparisonResult( Contact *_Nonnull obj1, Contact *_Nonnull obj2) {
return [[self displayNameForContact:obj1] compare:[self displayNameForContact:obj2] options:NSCaseInsensitiveSearch];
}];
if (![subAr containsObject:contact]) {
[subAr insertObject:contact atIndex:idx];
}
}
}
// since we refresh the tableview, we must perform this on main
// thread
dispatch_async(dispatch_get_main_queue(), ^(void) {
if (IPAD) {
if (!([self totalNumberOfItems] > 0)) {
ContactDetailsView *view = VIEW(ContactDetailsView);
[view setContact:nil];
}
}
});
}
[LinphoneManager.instance setLinphoneManagerAddressBookMap:addressBookMap];
}
LOGI(@"====>>>> Load contact list - End");
[super loadData];
_ongoing = FALSE;
}
- (void)loadSearchedData {
LOGI(@"Load search contact list");
- (void)buildContactTable {
@synchronized(addressBookMap) {
//Set all contacts from ContactCell to nil
for (NSInteger j = 0; j < [self.tableView numberOfSections]; ++j)
@ -237,101 +139,72 @@ static int ms_strcmpfuz(const char *fuzzy_word, const char *sentence) {
}
// Reset Address book
[addressBookMap removeAllObjects];
NSMutableArray *subAr = [NSMutableArray new];
NSMutableArray *subArBegin = [NSMutableArray new];
NSMutableArray *subArContain = [NSMutableArray new];
[addressBookMap insertObject:subAr forKey:@"" selector:@selector(caseInsensitiveCompare:)];
for (NSString *addr in sortedAddresses) {
@synchronized(
LinphoneManager.instance.fastAddressBook.addressBookMap) {
Contact *contact =
[LinphoneManager.instance.fastAddressBook.addressBookMap
objectForKey:addr];
BOOL add = true;
// Do not add the contact directly if we set some filter
if ([ContactSelection getSipFilter] ||
[ContactSelection emailFilterEnabled]) {
add = false;
}
NSString *filter = [ContactSelection getNameOrEmailFilter];
if ([FastAddressBook contactHasValidSipDomain:contact]) {
add = true;
}
if (contact.friend &&
linphone_presence_model_get_basic_status(
linphone_friend_get_presence_model(
contact.friend)) ==
LinphonePresenceBasicStatusOpen) {
add = true;
}
if (!add && [ContactSelection emailFilterEnabled]) {
// Add this contact if it has an email
add = (contact.emails.count > 0);
}
NSInteger idx_begin = -1;
NSInteger idx_sort = -1;
NSMutableString *name =
[self displayNameForContact:contact]
? [[NSMutableString alloc]
initWithString:
[self displayNameForContact:contact]]
: nil;
if (add && name != nil) {
if ([[contact displayName]
rangeOfString:filter
options:NSCaseInsensitiveSearch]
.location == 0) {
if (![subArBegin containsObject:contact]) {
idx_begin = idx_begin + 1;
[subArBegin insertObject:contact atIndex:idx_begin];
}
} else if ([[contact displayName]
rangeOfString:filter
options:NSCaseInsensitiveSearch]
.location != NSNotFound) {
if (![subArContain containsObject:contact]) {
idx_sort = idx_sort + 1;
[subArContain insertObject:contact atIndex:idx_sort];
}
}
}
}
}
[subArBegin
sortUsingComparator:^NSComparisonResult(
Contact *_Nonnull obj1, Contact *_Nonnull obj2) {
return [[self displayNameForContact:obj1]
compare:[self displayNameForContact:obj2]
options:NSCaseInsensitiveSearch];
}];
[subArContain
sortUsingComparator:^NSComparisonResult(
Contact *_Nonnull obj1, Contact *_Nonnull obj2) {
return [[self displayNameForContact:obj1]
compare:[self displayNameForContact:obj2]
options:NSCaseInsensitiveSearch];
}];
[subAr addObjectsFromArray:subArBegin];
[subAr addObjectsFromArray:subArContain];
[super loadData];
// since we refresh the tableview, we must perform this on main
// thread
dispatch_async(dispatch_get_main_queue(), ^(void) {
if (IPAD) {
if (!([self totalNumberOfItems] > 0)) {
ContactDetailsView *view = VIEW(ContactDetailsView);
[view setContact:nil];
}
}
});
}
//
NSArray *searchResults = [MagicSearchSingleton.instance getLastSearchContacts];
for (Contact *contact in searchResults) {
NSMutableString *name = [[NSMutableString alloc] initWithString: [self displayNameForContact:contact]];
if (name != nil) {
NSString *firstChar = [[name substringToIndex:1] uppercaseString];
// Put in correct subAr
if ([firstChar characterAtIndex:0] < 'A' || [firstChar characterAtIndex:0] > 'Z') {
firstChar = @"#";
}
NSMutableArray *subAr = [addressBookMap objectForKey:firstChar];
if (subAr == nil) {
subAr = [[NSMutableArray alloc] init];
[addressBookMap insertObject:subAr forKey:firstChar selector:@selector(caseInsensitiveCompare:)];
}
NSUInteger idx = [subAr indexOfObject:contact inSortedRange:(NSRange){0, subAr.count} options:NSBinarySearchingInsertionIndex usingComparator:^NSComparisonResult( Contact *_Nonnull obj1, Contact *_Nonnull obj2) {
return [[self displayNameForContact:obj1] compare:[self displayNameForContact:obj2] options:NSCaseInsensitiveSearch];
}];
if (![subAr containsObject:contact]) {
[subAr insertObject:contact atIndex:idx];
}
}
}
[super loadData];
}
// since we refresh the tableview, we must perform this on main
// thread
dispatch_async(dispatch_get_main_queue(), ^(void) {
if (IPAD) {
if (!([self totalNumberOfItems] > 0)) {
ContactDetailsView *view = VIEW(ContactDetailsView);
[view setContact:nil];
}
}
});
_reloadMagicSearch = FALSE;
}
- (void)loadData {
if (_reloadMagicSearch) {
NSString *domain = @"";
if ([ContactSelection getSipFilterEnabled]) {
LinphoneAccount *defaultAccount = linphone_core_get_default_account(LC);
if (defaultAccount) {
domain = [NSString stringWithUTF8String:linphone_account_params_get_domain(linphone_account_get_params(defaultAccount))];
}
}
int sourceFlags = LinphoneMagicSearchSourceFriends | LinphoneMagicSearchSourceLdapServers;
[MagicSearchSingleton.instance searchForContactsWithDomain:domain sourceFlags:sourceFlags clearCache:[LinphoneManager.instance getContactsUpdated]];
[LinphoneManager.instance setContactsUpdated:FALSE];
} else {
[self buildContactTable];
}
}
- (void)loadDataWithFilter: (NSString *)filter {
LOGI(@"Load search contact list");
_reloadMagicSearch = _reloadMagicSearch || [filter length]==0 || ![[MagicSearchSingleton.instance currentFilter] isEqualToString:filter];
[MagicSearchSingleton.instance setCurrentFilter:filter];
[self loadData];
}
#pragma mark - UITableViewDataSource Functions

View file

@ -34,39 +34,15 @@ typedef enum _ContactSelectionMode { ContactSelectionModeNone, ContactSelectionM
+ (NSString *)getAddAddress;
/*!
* Filters contacts by SIP domain.
* @param domain SIP domain to filter. Use @"*" or nil to disable it.
* @param enabled Wether SIP domain filter is enabled
*/
+ (void)setSipFilter:(NSString *)domain;
+ (void)enableSipFilter:(BOOL)enabled;
/*!
* Weither contacts are filtered by SIP domain or not.
* Wether SIP domain filter is enabled
* @return the filter used, or nil if none.
*/
+ (NSString *)getSipFilter;
/*!
* Weither always keep contacts with an email address or not.
* @param enable TRUE if you want to always keep contacts with an email.
*/
+ (void)enableEmailFilter:(BOOL)enable;
/*!
* Weither always keep contacts with an email address or not.
* @return TRUE if this behaviour is enabled.
*/
+ (BOOL)emailFilterEnabled;
/*!
* Filters contacts by name and/or email fuzzy matching pattern.
* @param fuzzyName fuzzy word to match. Use nil to disable it.
*/
+ (void)setNameOrEmailFilter:(NSString *)fuzzyName;
/*!
* Weither contacts are filtered by name and/or email.
* @return the filter used, or nil if none.
*/
+ (NSString *)getNameOrEmailFilter;
+ (BOOL)getSipFilterEnabled;
@end
@ -80,6 +56,9 @@ typedef enum _ContactSelectionMode { ContactSelectionModeNone, ContactSelectionM
@property(strong, nonatomic) IBOutlet UISearchBar *searchBar;
@property(weak, nonatomic) IBOutlet UIImageView *selectedButtonImage;
@property (weak, nonatomic) IBOutlet UIInterfaceStyleButton *toggleSelectionButton;
@property (weak, nonatomic) IBOutlet UILabel *loadingLabel;
@property (weak, nonatomic) IBOutlet UIView *loadingView;
@property (weak, nonatomic) IBOutlet UILabel *ldapMoreResultsLabel;
- (IBAction)onAllClick:(id)event;
- (IBAction)onLinphoneClick:(id)event;

View file

@ -17,15 +17,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "PhoneMainView.h"
@implementation ContactSelection
static ContactSelectionMode sSelectionMode = ContactSelectionModeNone;
static NSString *sAddAddress = nil;
static NSString *sSipFilter = nil;
static BOOL sEnableEmailFilter = FALSE;
static NSString *sNameOrEmailFilter;
static BOOL bSipFilterEnabled = FALSE;
static BOOL addAddressFromOthers = FALSE;
+ (void)setSelectionMode:(ContactSelectionMode)selectionMode {
@ -45,28 +44,12 @@ static BOOL addAddressFromOthers = FALSE;
return sAddAddress;
}
+ (void)setSipFilter:(NSString *)domain {
sSipFilter = domain;
+ (void)enableSipFilter:(BOOL)enabled {
bSipFilterEnabled = enabled;
}
+ (NSString *)getSipFilter {
return sSipFilter;
}
+ (void)enableEmailFilter:(BOOL)enable {
sEnableEmailFilter = enable;
}
+ (BOOL)emailFilterEnabled {
return sEnableEmailFilter;
}
+ (void)setNameOrEmailFilter:(NSString *)fuzzyName {
sNameOrEmailFilter = fuzzyName;
}
+ (NSString *)getNameOrEmailFilter {
return sNameOrEmailFilter;
+ (BOOL)getSipFilterEnabled {
return bSipFilterEnabled;
}
@end
@ -105,12 +88,16 @@ static UICompositeViewDescription *compositeDescription = nil;
#pragma mark - ViewController Functions
- (void)viewDidLoad {
NSLog(@"Debuglog viewDidLoad");
[super viewDidLoad];
_searchBar.text = [MagicSearchSingleton.instance currentFilter];
tableController.tableView.accessibilityIdentifier = @"Contacts table";
if (![[PhoneMainView.instance getPreviousViewName] isEqualToString:@"ContactDetailsView"]) {
_searchBar.text = @"";
}
[self changeView:ContactsAll];
/*if ([tableController totalNumberOfItems] == 0) {
[self changeView:ContactsAll];
}*/
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]
initWithTarget:self
action:@selector(dismissKeyboards)];
@ -120,8 +107,9 @@ static UICompositeViewDescription *compositeDescription = nil;
}
- (void)viewWillAppear:(BOOL)animated {
NSLog(@"Debuglog viewWillAppear");
[super viewWillAppear:animated];
[ContactSelection setNameOrEmailFilter:@""];
_searchBar.showsCancelButton = (_searchBar.text.length > 0);
int y = _searchBar.frame.origin.y + _searchBar.frame.size.height;
@ -143,9 +131,36 @@ static UICompositeViewDescription *compositeDescription = nil;
self.linphoneButton.hidden = TRUE;
self.selectedButtonImage.hidden = TRUE;
}
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(onMagicSearchStarted:)
name:kLinphoneMagicSearchStarted
object:nil];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(onMagicSearchFinished:)
name:kLinphoneMagicSearchFinished
object:nil];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(onMagicSearchMoreAvailable:)
name:kLinphoneMagicSearchMoreAvailable
object:nil];
}
- (void)onMagicSearchStarted:(NSNotification *)k {
_loadingView.hidden = FALSE;
}
- (void)onMagicSearchFinished:(NSNotification *)k {
_loadingView.hidden = TRUE;
}
- (void)onMagicSearchMoreAvailable:(NSNotification *)k {
_ldapMoreResultsLabel.hidden = FALSE;
}
- (void)viewDidAppear:(BOOL)animated {
NSLog(@"Debuglog viewDidAppear");
[super viewDidAppear:animated];
if (![FastAddressBook isAuthorized]) {
UIAlertController *errView = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Address book", nil)
@ -182,6 +197,7 @@ static UICompositeViewDescription *compositeDescription = nil;
}
- (void) viewWillDisappear:(BOOL)animated {
[[NSNotificationCenter defaultCenter] removeObserver:self];
self.view = NULL;
[self.tableController removeAllContacts];
}
@ -189,25 +205,26 @@ static UICompositeViewDescription *compositeDescription = nil;
#pragma mark -
- (void)changeView:(ContactsCategory)view {
NSLog(@"Debuglog changeView");
CGRect frame = _selectedButtonImage.frame;
if (view == ContactsAll && !allButton.selected) {
//REQUIRED TO RELOAD WITH FILTER
[LinphoneManager.instance setContactsUpdated:TRUE];
frame.origin.x = allButton.frame.origin.x;
[ContactSelection setSipFilter:nil];
[ContactSelection enableEmailFilter:FALSE];
[ContactSelection enableSipFilter:FALSE];
allButton.selected = TRUE;
linphoneButton.selected = FALSE;
[tableController loadData];
[tableController setReloadMagicSearch:TRUE];
[tableController loadDataWithFilter: _searchBar.text];
} else if (view == ContactsLinphone && !linphoneButton.selected) {
//REQUIRED TO RELOAD WITH FILTER
[LinphoneManager.instance setContactsUpdated:TRUE];
frame.origin.x = linphoneButton.frame.origin.x;
[ContactSelection setSipFilter:LinphoneManager.instance.contactFilter];
[ContactSelection enableEmailFilter:FALSE];
[ContactSelection enableSipFilter:TRUE];
linphoneButton.selected = TRUE;
allButton.selected = FALSE;
[tableController loadData];
[tableController setReloadMagicSearch:TRUE];
[tableController loadDataWithFilter: _searchBar.text];
}
_selectedButtonImage.frame = frame;
if ([LinphoneManager.instance lpConfigBoolForKey:@"hide_linphone_contacts" inSection:@"app"]) {
@ -217,7 +234,7 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)refreshButtons {
[addButton setHidden:FALSE];
[self changeView:[ContactSelection getSipFilter] ? ContactsLinphone : ContactsAll];
[self changeView:[ContactSelection getSipFilterEnabled] ? ContactsLinphone : ContactsAll];
}
#pragma mark - Action Functions
@ -263,9 +280,9 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
searchBar.text = @"";
[self searchBar:searchBar textDidChange:@""];
[LinphoneManager.instance setContactsUpdated:TRUE];
[tableController loadData];
[self searchBar:searchBar textDidChange:@""];
[searchBar resignFirstResponder];
}
@ -278,14 +295,13 @@ static UICompositeViewDescription *compositeDescription = nil;
#pragma mark - searchBar delegate
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
// display searchtext in UPPERCASE
// searchBar.text = [searchText uppercaseString];
[ContactSelection setNameOrEmailFilter:searchText];
if (searchText.length == 0) {
[LinphoneManager.instance setContactsUpdated:TRUE];
[tableController loadData];
} else {
[tableController loadSearchedData];
NSLog(@"Debuglog textdidchange");
if (![searchText isEqualToString:[MagicSearchSingleton.instance currentFilter]]) {
if (searchText.length == 0) {
[LinphoneManager.instance setContactsUpdated:TRUE];
}
_ldapMoreResultsLabel.hidden = TRUE;
[tableController loadDataWithFilter:searchText];
}
}

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "DevicesListView.h"
#import "PhoneMainView.h"
#import "UIDeviceCell.h"

View file

@ -390,9 +390,7 @@ static UICompositeViewDescription *compositeDescription = nil;
- (IBAction)onAddContactClick:(id)event {
[ContactSelection setSelectionMode:ContactSelectionModeEdit];
[ContactSelection setAddAddress:[_addressField text]];
[ContactSelection setSipFilter:nil];
[ContactSelection setNameOrEmailFilter:nil];
[ContactSelection enableEmailFilter:FALSE];
[ContactSelection enableSipFilter:FALSE];
[PhoneMainView.instance changeCurrentView:ContactsListView.compositeViewDescription];
}

View file

@ -194,10 +194,7 @@ static UICompositeViewDescription *compositeDescription = nil;
normSip = [normSip hasPrefix:@"sip:"] ? [normSip substringFromIndex:4] : normSip;
[ContactSelection setAddAddress:normSip];
[ContactSelection setSelectionMode:ContactSelectionModeEdit];
[ContactSelection setSipFilter:nil];
[ContactSelection enableEmailFilter:FALSE];
[ContactSelection setNameOrEmailFilter:nil];
[ContactSelection enableSipFilter:FALSE];
[PhoneMainView.instance changeCurrentView:ContactsListView.compositeViewDescription];
ms_free(lAddress);
}

View file

@ -23,7 +23,6 @@
#import <UserNotifications/UserNotifications.h>
#import <UserNotificationsUI/UserNotificationsUI.h>
#import <CoreLocation/CoreLocation.h>
#import "linphoneapp-Swift.h"
@interface LinphoneAppDelegate : NSObject <UIApplicationDelegate, UNUserNotificationCenterDelegate, CLLocationManagerDelegate> {

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "LinphoneAppDelegate.h"
#import "ContactDetailsView.h"
#import "ContactsListView.h"
@ -69,10 +70,6 @@
[view removeCallBacks];
[view.tableController setChatRoom:NULL];
[view setChatRoom:NULL];
} else if (PhoneMainView.instance.currentView == ChatConversationInfoView.compositeViewDescription) {
ChatConversationInfoView *view = VIEW(ChatConversationInfoView);
[view removeCallbacks];
[view setRoom:NULL];
} else if (PhoneMainView.instance.currentView == RecordingsListView.compositeViewDescription || PhoneMainView.instance.currentView == DevicesListView.compositeViewDescription) {
// To avoid crash
[PhoneMainView.instance changeCurrentView:DialerView.compositeViewDescription];
@ -325,12 +322,6 @@
if (bgStartId != UIBackgroundTaskInvalid)
[[UIApplication sharedApplication] endBackgroundTask:bgStartId];
//Enable all notification type. VoIP Notifications don't present a UI but we will use this to show local nofications later
UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert| UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil];
//register the notification settings
[application registerUserNotificationSettings:notificationSettings];
//output what state the app is in. This will be used to see when the app is started in the background
LOGI(@"app launched with state : %li", (long)application.applicationState);
LOGI(@"FINISH LAUNCHING WITH OPTION : %@", launchOptions.description);

View file

@ -30,6 +30,8 @@
- (void)transformLinphoneCoreToKeys;
- (void)transformAccountToKeys:(NSString *)username;
- (void)transformLdapToKeys:(NSString *)ldap_server;
- (void)removeAccount;
- (void)removeLdap;
@end

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "LinphoneCoreSettingsStore.h"
#import "Utils.h"
#import "PhoneMainView.h"
@ -256,6 +257,87 @@
}
}
- (void)transformLdapToKeys:(NSString *)ldap_server {
const MSList *ldaps = linphone_core_get_ldap_list(LC);
while (ldap_server && ldaps &&
strcmp(ldap_server.UTF8String,
linphone_ldap_params_get_server(linphone_ldap_get_params(ldaps->data))) != 0) {
ldaps = ldaps->next;
}
LinphoneLdap *ldap = NULL;
// default values
{
[self setBool:YES forKey:@"ldap_enabled"];
[self setObject:@"" forKey:@"ldap_server"];
[self setObject:@"" forKey:@"ldap_bind_dn"];
[self setObject:@"" forKey:@"ldap_password"];
[self setObject:@"simple" forKey:@"ldap_auth_method"];
[self setBool:YES forKey:@"ldap_tls_enabled"];
[self setObject:@"default" forKey:@"ldap_certificates_verification_mode"];
[self setObject:@"" forKey:@"ldap_filter"];
[self setInteger:50 forKey:@"ldap_max_results"];
[self setInteger:5 forKey:@"ldap_timeout"];
[self setInteger:500 forKey:@"ldap_delay"];
[self setInteger:3 forKey:@"ldap_min_chars"];
[self setObject:@"" forKey:@"ldap_name_attribute"];
[self setObject:@"" forKey:@"ldap_sip_attribute"];
[self setObject:@"" forKey:@"ldap_sip_domain"];
[self setBool:NO forKey:@"ldap_logs_enabled"];
}
if (ldaps) {
ldap = ldaps->data;
LinphoneLdapParams const *ldapParams = linphone_ldap_get_params(ldap);
int idx = (int)bctbx_list_index(linphone_core_get_ldap_list(LC), ldap);
[self setInteger:idx forKey:@"current_ldap_index"];
[self setBool:linphone_ldap_params_get_enabled(ldapParams) forKey:@"ldap_enabled"];
[self setCString:linphone_ldap_params_get_server(ldapParams) forKey:@"ldap_server"];
[self setCString:linphone_ldap_params_get_bind_dn(ldapParams) forKey:@"ldap_bind_dn"];
[self setCString:linphone_ldap_params_get_password(ldapParams) forKey:@"ldap_password"];
[self setBool:linphone_ldap_params_tls_enabled(ldapParams) forKey:@"ldap_tls_enabled"];
switch (linphone_ldap_params_get_auth_method(ldapParams)) {
case LinphoneLdapAuthMethodSimple:
[self setObject:@"simple" forKey:@"ldap_auth_method"];
break;
case LinphoneLdapAuthMethodAnonymous:
[self setObject:@"anonymous" forKey:@"ldap_auth_method"];
break;
}
switch (linphone_ldap_params_get_server_certificates_verification_mode(ldapParams)) {
case LinphoneLdapCertVerificationDefault:
[self setObject:@"default" forKey:@"ldap_certificates_verification_mode"];
break;
case LinphoneLdapCertVerificationEnabled:
[self setObject:@"enabled" forKey:@"ldap_certificates_verification_mode"];
break;
case LinphoneLdapCertVerificationDisabled:
[self setObject:@"disabled" forKey:@"ldap_certificates_verification_mode"];
break;
}
[self setCString:linphone_ldap_params_get_base_object(ldapParams) forKey:@"ldap_base_object"];
[self setCString:linphone_ldap_params_get_filter(ldapParams) forKey:@"ldap_filter"];
[self setInteger:linphone_ldap_params_get_max_results(ldapParams) forKey:@"ldap_max_results"];
[self setInteger:linphone_ldap_params_get_timeout(ldapParams) forKey:@"ldap_timeout"];
[self setInteger:linphone_ldap_params_get_delay(ldapParams) forKey:@"ldap_delay"];
[self setInteger:linphone_ldap_params_get_min_chars(ldapParams) forKey:@"ldap_min_chars"];
[self setCString:linphone_ldap_params_get_name_attribute(ldapParams) forKey:@"ldap_name_attribute"];
[self setCString:linphone_ldap_params_get_sip_attribute(ldapParams) forKey:@"ldap_sip_attribute"];
[self setCString:linphone_ldap_params_get_sip_domain(ldapParams) forKey:@"ldap_sip_domain"];
bool ldapLogsEnabled = linphone_ldap_params_get_debug_level(ldapParams) == LinphoneLdapDebugLevelVerbose;
[self setBool:ldapLogsEnabled forKey:@"ldap_logs_enabled"];
}
}
- (void)transformLinphoneCoreToKeys {
LinphoneManager *lm = LinphoneManager.instance;
@ -333,7 +415,12 @@
[self setBool:[lm lpConfigBoolForKey:@"repeat_call_notification"]
forKey:@"repeat_call_notification_preference"];
[self setBool:linphone_core_is_media_encryption_mandatory(LC) forKey:@"media_encrption_mandatory_preference"];
if (linphone_core_get_media_encryption(LC) == LinphoneMediaEncryptionNone) {
[self setBool:FALSE forKey:@"media_encrption_mandatory_preference"];
linphone_core_set_media_encryption_mandatory(LC, FALSE);
} else {
[self setBool:linphone_core_is_media_encryption_mandatory(LC) forKey:@"media_encrption_mandatory_preference"];
}
[self setBool:[lm lpConfigBoolForKey:@"pref_accept_early_media"]
forKey:@"pref_accept_early_media_preference"];
}
@ -418,6 +505,11 @@
[self setInteger:443 forKey:@"tunnel_port_preference"];
}
}
// contacts section
if (linphone_core_ldap_available(LC)) {
[self transformLdapToKeys:nil];
}
// advanced section
{
@ -540,7 +632,7 @@
goto bad_proxy;
LinphoneAddress *linphoneAddress = linphone_core_interpret_url(LC, "sip:user@domain.com");
LinphoneAddress *linphoneAddress = linphone_address_clone(linphone_account_params_get_identity_address(linphone_account_get_params(account)));
linphone_address_set_username(linphoneAddress, username.UTF8String);
if ([LinphoneManager.instance lpConfigBoolForKey:@"use_phone_number" inSection:@"assistant"]) {
char *user = linphone_account_normalize_phone_number(account, username.UTF8String);
@ -681,6 +773,71 @@
}
}
- (void)synchronizeLdap {
LOGI(@"LDAP config changed, synchronizing.");
LinphoneLdap*ldap = bctbx_list_nth_data(linphone_core_get_ldap_list(LC), [self integerForKey:@"current_ldap_index"]);
if (!ldap) {
return;
}
if ([self stringForKey:@"ldap_base_object"].length == 0) {
UIAlertController *errView = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Error", nil)
message:@"LDAPResearch base must not be empty"
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", nil)
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {}];
[errView addAction:defaultAction];
[PhoneMainView.instance presentViewController:errView animated:YES completion:nil];
return;
}
LinphoneLdapParams *newLdapParams = linphone_ldap_params_clone(linphone_ldap_get_params(ldap));
// Connexion parameters
linphone_ldap_params_set_enabled(newLdapParams, [self boolForKey:@"ldap_enabled"]);
linphone_ldap_params_set_server(newLdapParams, [self stringForKey:@"ldap_server"].UTF8String);
linphone_ldap_params_set_bind_dn(newLdapParams, [self stringForKey:@"ldap_bind_dn"].UTF8String);
linphone_ldap_params_set_password(newLdapParams, [self stringForKey:@"ldap_password"].UTF8String);
LinphoneLdapAuthMethod authMethod = [[self stringForKey:@"ldap_auth_method"] isEqualToString:@"simple"] ? LinphoneLdapAuthMethodSimple : LinphoneLdapAuthMethodAnonymous;
linphone_ldap_params_set_auth_method(newLdapParams, authMethod);
linphone_ldap_params_enable_tls(newLdapParams, [self boolForKey:@"ldap_tls_enabled"]);
LinphoneLdapCertVerificationMode certVerifMode = LinphoneLdapCertVerificationDefault;
NSString *certVerifModeStr = [self stringForKey:@"ldap_certificates_verification_mode"];
if ([certVerifModeStr isEqualToString:@"enabled"])
certVerifMode = LinphoneLdapCertVerificationEnabled;
else if ([certVerifModeStr isEqualToString:@"disabled"])
certVerifMode = LinphoneLdapCertVerificationEnabled;
linphone_ldap_params_set_server_certificates_verification_mode(newLdapParams, certVerifMode);
// Research parameters
linphone_ldap_params_set_base_object(newLdapParams, [self stringForKey:@"ldap_base_object"].UTF8String);
linphone_ldap_params_set_filter(newLdapParams, [self stringForKey:@"ldap_filter"].UTF8String);
linphone_ldap_params_set_max_results(newLdapParams, [self integerForKey:@"ldap_max_results"]);
linphone_ldap_params_set_timeout(newLdapParams, [self integerForKey:@"ldap_timeout"]);
linphone_ldap_params_set_delay(newLdapParams, [self integerForKey:@"ldap_delay"]);
linphone_ldap_params_set_min_chars(newLdapParams, [self integerForKey:@"ldap_min_chars"]);
// Analysis parameters
linphone_ldap_params_set_name_attribute(newLdapParams, [self stringForKey:@"ldap_name_attribute"].UTF8String);
linphone_ldap_params_set_sip_attribute(newLdapParams, [self stringForKey:@"ldap_sip_attribute"].UTF8String);
linphone_ldap_params_set_sip_domain(newLdapParams, [self stringForKey:@"ldap_sip_domain"].UTF8String);
// Miscellaneous parameters
LinphoneLdapDebugLevel debugLevel = [self boolForKey:@"ldap_logs_enabled"] ? LinphoneLdapDebugLevelVerbose : LinphoneLdapDebugLevelOff;
linphone_ldap_params_set_debug_level(newLdapParams, debugLevel);
linphone_ldap_set_params(ldap, newLdapParams);
}
- (BOOL)synchronize {
@try {
LinphoneManager *lm = LinphoneManager.instance;
@ -699,7 +856,7 @@
if (account_changed)
[self synchronizeAccounts];
bool enableVideo = [self boolForKey:@"enable_video_preference"];
linphone_core_enable_video_capture(LC, enableVideo);
linphone_core_enable_video_display(LC, enableVideo);
@ -866,8 +1023,10 @@
linphone_core_set_media_encryption(LC, LinphoneMediaEncryptionZRTP);
else if (menc && [menc compare:@"DTLS"] == NSOrderedSame)
linphone_core_set_media_encryption(LC, LinphoneMediaEncryptionDTLS);
else
else {
linphone_core_set_media_encryption(LC, LinphoneMediaEncryptionNone);
[self setBool:FALSE forKey:@"media_encrption_mandatory_preference"];
}
linphone_core_enable_adaptive_rate_control(LC, [self boolForKey:@"adaptive_rate_control_preference"]);
@ -903,6 +1062,19 @@
linphone_tunnel_set_mode(tunnel, mode);
}
// contacts section
BOOL ldap_changed = NO;
for (NSString *key in self->changedDict) {
if ([key hasPrefix:@"ldap_"] && [self valueChangedForKey:key]) {
ldap_changed = YES;
break;
}
}
if (ldap_changed)
[self synchronizeLdap];
// advanced section
BOOL animations = [self boolForKey:@"animations_preference"];
[lm lpConfigSetInt:animations forKey:@"animations_preference"];
@ -1004,4 +1176,11 @@
}
[self transformLinphoneCoreToKeys];
}
- (void)removeLdap {
LinphoneLdap *ldap = bctbx_list_nth_data(linphone_core_get_ldap_list(LC),
[self integerForKey:@"current_ldap_index"]);
linphone_core_remove_ldap(LC, ldap);
[self transformLinphoneCoreToKeys];
}
@end

View file

@ -35,7 +35,6 @@
#include "bctoolbox/list.h"
#import "OrderedDictionary.h"
#import "linphoneapp-Swift.h"
extern NSString *const LINPHONERC_APPLICATION_KEY;
@ -64,6 +63,9 @@ extern NSString *const kLinphoneVoiceMessagePlayerEOF;
extern NSString *const kLinphoneVoiceMessagePlayerLostFocus;
extern NSString *const kLinphoneConfStateParticipantListChanged;
extern NSString *const kLinphoneConfStateChanged;
extern NSString *const kLinphoneMagicSearchStarted;
extern NSString *const kLinphoneMagicSearchFinished;
extern NSString *const kLinphoneMagicSearchMoreAvailable;
extern NSString *const kLinphoneMsgNotificationAppGroupId;
@ -179,9 +181,6 @@ typedef struct _LinphoneManagerSounds {
- (void)shouldPresentLinkPopup;
- (void) setLinphoneManagerAddressBookMap:(OrderedDictionary*) addressBook;
- (OrderedDictionary*) getLinphoneManagerAddressBookMap;
- (void) setContactsUpdated:(BOOL) updated;
- (BOOL) getContactsUpdated;

View file

@ -22,6 +22,7 @@
#include <netdb.h>
#include <sys/sysctl.h>
#import "linphoneapp-Swift.h"
#import <AudioToolbox/AudioToolbox.h>
#import <CoreTelephony/CTCallCenter.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
@ -79,6 +80,9 @@ NSString *const kLinphoneVoiceMessagePlayerEOF = @"LinphoneVoiceMessagePlayerEOF
NSString *const kLinphoneVoiceMessagePlayerLostFocus = @"LinphoneVoiceMessagePlayerLostFocus";
NSString *const kLinphoneConfStateChanged = @"kLinphoneConfStateChanged";
NSString *const kLinphoneConfStateParticipantListChanged = @"kLinphoneConfStateParticipantListChanged";
NSString *const kLinphoneMagicSearchStarted = @"LinphoneMagicSearchStarted";
NSString *const kLinphoneMagicSearchFinished = @"LinphoneMagicSearchFinished";
NSString *const kLinphoneMagicSearchMoreAvailable = @"LinphoneMagicSearchMoreAvailable";
NSString *const kLinphoneMsgNotificationAppGroupId = @"group.org.linphone.phone.msgNotification";
@ -285,15 +289,7 @@ struct codec_name_pref_table codec_pref_table[] = {{"speex", 8000, "speex_8k_pre
[NSNotificationCenter.defaultCenter removeObserver:self];
}
#pragma mark - AddressBookMap
- (void) setLinphoneManagerAddressBookMap:(OrderedDictionary*) addressBook{
_linphoneManagerAddressBookMap = addressBook;
}
- (OrderedDictionary*) getLinphoneManagerAddressBookMap{
return _linphoneManagerAddressBookMap;
}
#pragma mark - Contacts Updated
- (void) setContactsUpdated:(BOOL) updated{
_contactsUpdated = updated;
@ -629,6 +625,11 @@ static void linphone_iphone_global_state_changed(LinphoneCore *lc, LinphoneGloba
if (theLinphoneCore && linphone_core_get_global_state(theLinphoneCore) != LinphoneGlobalOff)
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneGlobalStateUpdate object:self userInfo:dict];
});
if (state == LinphoneGlobalOn) {
// reload friends
[self.fastAddressBook fetchContactsInBackGroundThread];
}
}
- (void)globalStateChangedNotificationHandler:(NSNotification *)notif {
@ -1449,6 +1450,7 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
- (void)destroyLinphoneCore {
// just in case
[self removeCTCallCenterCb];
[MagicSearchSingleton destroyInstance];
if (theLinphoneCore != nil) { // just in case application terminate before linphone core initialization
@ -1478,8 +1480,6 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
- (void)resetLinphoneCore {
[self destroyLinphoneCore];
[self createLinphoneCore];
// reload friends
[self.fastAddressBook fetchContactsInBackGroundThread];
}
static int comp_call_id(const LinphoneCall *call, const char *callid) {

View file

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -23,18 +24,18 @@
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" insetsLayoutMarginsFromSafeArea="NO" image="avatar.png" translatesAutoresizingMaskIntoConstraints="NO" id="Z2U-vm-azg" userLabel="avatarImage" customClass="UIRoundedImageView">
<rect key="frame" x="0.0" y="5" width="44" height="28"/>
<rect key="frame" x="0.0" y="8" width="44" height="28"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" insetsLayoutMarginsFromSafeArea="NO" text="John Doe" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="f3q-pd-EF5" userLabel="displayNameLabel">
<rect key="frame" x="43" y="11" width="185" height="16"/>
<rect key="frame" x="43" y="0.0" width="185" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" fixedFrame="YES" insetsLayoutMarginsFromSafeArea="NO" text="Today - 18h42" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hEV-7I-B0v" userLabel="contactDateLabel">
<rect key="frame" x="200" y="13" width="159" height="12"/>
<rect key="frame" x="229" y="16" width="130" height="12"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact name"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
@ -42,12 +43,15 @@
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</tableViewCellContentView>
<point key="canvasLocation" x="61.5" y="52"/>
<point key="canvasLocation" x="60" y="51.27436281859071"/>
</tableViewCell>
</objects>
<resources>
<image name="avatar.png" width="414.39999389648438" height="414.39999389648438"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View file

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -22,7 +20,6 @@
<rect key="frame" x="14" y="18" width="92" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" fixedFrame="YES" image="conference_delete.png" translatesAutoresizingMaskIntoConstraints="NO" id="yfP-hQ-SXb" userLabel="selectedImage">
@ -39,6 +36,6 @@
</collectionViewCell>
</objects>
<resources>
<image name="conference_delete.png" width="11" height="11"/>
<image name="conference_delete.png" width="17.600000381469727" height="17.600000381469727"/>
</resources>
</document>

View file

@ -152,8 +152,6 @@
- (IBAction)onContactsClick:(id)event {
[ContactSelection setAddAddress:nil];
[ContactSelection enableEmailFilter:FALSE];
[ContactSelection setNameOrEmailFilter:nil];
[PhoneMainView.instance changeCurrentView:ContactsListView.compositeViewDescription];
}

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "UICallButton.h"
#import "LinphoneManager.h"

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "UICallConferenceCell.h"
#import "Utils.h"
#import "PhoneMainView.h"

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "UIChatBubblePhotoCell.h"
#import "LinphoneManager.h"
#import "PhoneMainView.h"

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "UIChatBubbleTextCell.h"
#import "LinphoneManager.h"
#import "PhoneMainView.h"
@ -379,7 +380,7 @@ static const CGFloat REPLY_OR_FORWARD_TAG_HEIGHT = 18;
return cached;
}
CGSize size = [self ViewHeightForMessageText:chat withWidth:width textForImdn:nil];
CGSize size = [self ViewHeightForMessageText:chat withWidth:width textForImdn:nil];
size.height += linphone_chat_message_is_forward(chat) || linphone_chat_message_is_reply(chat) ? REPLY_OR_FORWARD_TAG_HEIGHT : 0;
size.height += linphone_chat_message_is_reply(chat) ? REPLY_CHAT_BUBBLE_HEIGHT+5 : 0;

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "UIHangUpButton.h"
#import "LinphoneManager.h"

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "UIPauseButton.h"
#import "LinphoneManager.h"
#import "Utils.h"
@ -94,7 +95,7 @@
break;
}
case UIPauseButtonType_Conference: {
linphone_core_leave_conference(CallManager.instance.getConference);
linphone_conference_leave(CallManager.instance.getConference);
// Fake event
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneCallUpdate object:self];
break;
@ -131,7 +132,7 @@
break;
}
case UIPauseButtonType_Conference: {
linphone_core_enter_conference(CallManager.instance.getConference);
linphone_conference_enter(CallManager.instance.getConference);
// Fake event
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneCallUpdate object:self];
break;

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import <AudioToolbox/AudioToolbox.h>
#import "UISpeakerButton.h"
#import "Utils.h"

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "UIVideoButton.h"
#include "LinphoneManager.h"
#import "Log.h"

142
Classes/MagicSearch.swift Normal file
View file

@ -0,0 +1,142 @@
//
// ContactListMagicSearch.swift
// linphone
//
// Created by QuentinArguillere on 25/03/2022.
//
import Foundation
import linphonesw
@objc class MagicSearchSingleton : NSObject {
static var theMagicSearchSingleton: MagicSearchSingleton?
var lc = CallManager.instance().lc
var ongoingSearch = false
var needUpdateLastSearchContacts = false
var lastSearchContacts : [Contact] = []
@objc var currentFilter : String = ""
var previousFilter : String?
var magicSearch : MagicSearch
var magicSearchDelegate : MagicSearchDelegate?
override init() {
magicSearch = try! lc!.createMagicSearch()
magicSearch.limitedSearch = false
super.init()
magicSearchDelegate = MagicSearchDelegateStub(onSearchResultsReceived: { (magicSearch: MagicSearch) in
self.needUpdateLastSearchContacts = true
self.ongoingSearch = false
Log.directLog(BCTBX_LOG_MESSAGE, text: "Contact magic search -- filter = \(String(describing: self.previousFilter)) -- \(magicSearch.lastSearch.count) contact founds")
NotificationCenter.default.post(name: Notification.Name(kLinphoneMagicSearchFinished), object: self)
}, onLdapHaveMoreResults: { (magicSearch: MagicSearch, ldap: Ldap) in
Log.directLog(BCTBX_LOG_MESSAGE, text: "Ldap have more result")
NotificationCenter.default.post(name: Notification.Name(kLinphoneMagicSearchMoreAvailable), object: self)
})
magicSearch.addDelegate(delegate: magicSearchDelegate!)
}
@objc static func instance() -> MagicSearchSingleton {
if (theMagicSearchSingleton == nil) {
theMagicSearchSingleton = MagicSearchSingleton()
}
return theMagicSearchSingleton!
}
@objc static func destroyInstance() {
theMagicSearchSingleton = nil
}
func getContactFromAddr(addr: Address) -> Contact? {
return LinphoneManager.instance().fastAddressBook.addressBookMap.object(forKey: addr.asStringUriOnly() as Any) as? Contact
}
func getContactFromPhoneNb(phoneNb: String) -> Contact? {
let contactKey = FastAddressBook.localizedLabel(FastAddressBook.normalizeSipURI( lc?.defaultAccount?.normalizePhoneNumber(username: phoneNb) ?? phoneNb))
return LinphoneManager.instance().fastAddressBook.addressBookMap.object(forKey: contactKey as Any) as? Contact
}
func searchAndAddMatchingContact(searchResult: SearchResult) -> Contact? {
if let friend = searchResult.friend {
if (searchResult.sourceFlags == MagicSearchSource.LdapServers.rawValue), let newContact = Contact(friend: friend.getCobject) {
// Contact comes from LDAP, creating a new one
newContact.createdFromLdap = true
return newContact
}
if let addr = friend.address, let foundContact = getContactFromAddr(addr: addr) {
return foundContact
}
for phoneNb in friend.phoneNumbers {
if let foundContact = getContactFromPhoneNb(phoneNb: phoneNb) {
return foundContact
}
}
}
if let addr = searchResult.address, let foundContact = getContactFromAddr(addr: addr) {
return foundContact
}
if let foundContact = getContactFromPhoneNb(phoneNb: searchResult.phoneNumber) {
return foundContact
}
return nil
}
@objc func isSearchOngoing() -> Bool {
return ongoingSearch
}
@objc func getLastSearchResults() -> UnsafeMutablePointer<bctbx_list_t>? {
var cList: UnsafeMutablePointer<bctbx_list_t>? = nil
for data in magicSearch.lastSearch {
cList = bctbx_list_append(cList, UnsafeMutableRawPointer(data.getCobject))
}
return cList
}
@objc func getLastSearchContacts() -> [Contact] {
if (needUpdateLastSearchContacts) {
lastSearchContacts = []
for res in magicSearch.lastSearch {
if let contact = searchAndAddMatchingContact(searchResult: res) {
lastSearchContacts.append(contact)
}
}
needUpdateLastSearchContacts = false
}
return lastSearchContacts
}
@objc func searchForContacts(domain: String, sourceFlags: Int, clearCache: Bool) {
if (clearCache) {
magicSearch.resetSearchCache()
}
if let oldFilter = previousFilter {
if (oldFilter.count > currentFilter.count || oldFilter != currentFilter) {
magicSearch.resetSearchCache()
}
}
previousFilter = currentFilter
ongoingSearch = true
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
if (self.ongoingSearch) {
NotificationCenter.default.post(name: Notification.Name(kLinphoneMagicSearchStarted), object: self)
}
}
magicSearch.getContactsListAsync(filter: currentFilter, domain: domain, sourceFlags: sourceFlags, aggregation: MagicSearchAggregation.Friend)
}
func setupLDAPTestSettings() {
}
}

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import <QuartzCore/QuartzCore.h>
#import <AudioToolbox/AudioServices.h>
#import "LinphoneAppDelegate.h"

View file

@ -232,6 +232,11 @@
UIScrollView *scrollView = self.tableView;
[scrollView setContentInset:inset];
[scrollView setScrollIndicatorInsets:inset];
// specific for media encryption
if (linphone_core_get_media_encryption(LC) == LinphoneMediaEncryptionNone && linphone_core_is_media_encryption_mandatory(LC)) {
linphone_core_set_media_encryption_mandatory(LC, FALSE);
[self.tableView reloadData];
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@ -587,7 +592,33 @@ void update_hash_cbs(LinphoneAccountCreator *creator, LinphoneAccountCreatorStat
[specifier.specifierDict setValue:name forKey:kIASKTitle];
}
}
if ([specifier.key hasPrefix:@"ldap_"]) {
if (linphone_core_ldap_available(LC)) {
const bctbx_list_t *ldaps = linphone_core_get_ldap_list(LC);
int index = [specifier.key substringFromIndex:@"ldap_".length].intValue - 1;
if (index < bctbx_list_size(ldaps)) {
const LinphoneLdapParams *ldapParams = linphone_ldap_get_params(bctbx_list_nth_data(ldaps, index));
NSString *name = [NSString
stringWithUTF8String:linphone_ldap_params_get_server(ldapParams)];
[specifier.specifierDict setValue:name forKey:kIASKTitle];
}
}
}
if ([[specifier key] isEqualToString:@"ldap_auth_method"]) {
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:[specifier specifierDict]];
NSMutableArray *titles = [NSMutableArray arrayWithArray:[dict objectForKey:@"Titles"]];
[titles removeObject:@"TLS"];
[dict setObject:titles forKey:@"Titles"];
NSMutableArray *values = [NSMutableArray arrayWithArray:[dict objectForKey:@"Values"]];
[values removeObject:@"tls"];
[dict setObject:values forKey:@"Values"];
return [[IASKSpecifier alloc] initWithSpecifier:dict];
}
return specifier;
}
@ -600,10 +631,17 @@ void update_hash_cbs(LinphoneAccountCreator *creator, LinphoneAccountCreatorStat
[hiddenKeys addObject:[NSString stringWithFormat:@"menu_account_%lu", i]];
}
const MSList *ldaps = linphone_core_get_ldap_list(LC);
for (size_t i = bctbx_list_size(ldaps) + 1; i <= 5; i++) {
[hiddenKeys addObject:[NSString stringWithFormat:@"ldap_%lu", i]];
}
if (!linphone_core_sip_transport_supported(LC, LinphoneTransportTls)) {
[hiddenKeys addObject:@"media_encryption_preference"];
}
if (!linphone_core_ldap_available(LC)) {
[hiddenKeys addObject:@"contacts_menu"];
}
#ifndef DEBUG
[hiddenKeys addObject:@"debug_actions_group"];
[hiddenKeys addObject:@"release_button"];
@ -738,6 +776,17 @@ void update_hash_cbs(LinphoneAccountCreator *creator, LinphoneAccountCreatorStat
[[_settingsController tableView] reloadData];
}
-(void)recomputeLdapLabelsAndSync {
// it's a bit violent... but IASK is not designed to dynamically change subviews' name
_settingsController.hiddenKeys = [self findHiddenKeys];
[_settingsController.settingsReader indexPathForKey:@"ldap_1"]; // force refresh ldap server name display
[_settingsController.settingsReader indexPathForKey:@"ldap_2"]; // force refresh ldap server name display
[_settingsController.settingsReader indexPathForKey:@"ldap_3"]; // force refresh ldap server name display
[_settingsController.settingsReader indexPathForKey:@"ldap_4"]; // force refresh ldap server name display
[_settingsController.settingsReader indexPathForKey:@"ldap_5"]; // force refresh ldap server name display
[[_settingsController tableView] reloadData];
}
#pragma mark - IASKSettingsDelegate Functions
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController *)sender {
@ -749,10 +798,15 @@ void update_hash_cbs(LinphoneAccountCreator *creator, LinphoneAccountCreatorStat
// going to account: fill account specific info
if ([sender.file isEqualToString:@"Account"]) {
LOGI(@"Going editting account %@", sender.title);
LOGI(@"Going editing account %@", sender.title);
[settingsStore transformAccountToKeys:sender.title];
// coming back to default: if we were in account, we must synchronize account now
} else if ([sender.file isEqualToString:@"Root"]) {
} else if ([sender.file isEqualToString:@"Contacts"]) {
[settingsStore synchronize];
[self recomputeLdapLabelsAndSync];
} else if ([sender.file isEqualToString:@"LDAP"]) {
LOGI(@"Going editing LDAP config %@", sender.title);
[settingsStore transformLdapToKeys:sender.title];
} else if ([sender.file isEqualToString:@"Root"]) { // coming back to default: if we were in account, we must synchronize account now
[settingsStore synchronize];
[self recomputeAccountLabelsAndSync];
}
@ -982,6 +1036,32 @@ void update_hash_cbs(LinphoneAccountCreator *creator, LinphoneAccountCreatorStat
[self presentViewController:errView animated:YES completion:nil];
} else if ([key isEqual:@"send_db_button"]) {
[self sendEmailWithPrivacyAttachments];
} else if ([key isEqual:@"new_ldap_button"]) {
if (bctbx_list_size(linphone_core_get_ldap_list(LC)) < 5 ) {
linphone_core_add_ldap(LC, linphone_core_create_ldap(LC));
[self recomputeLdapLabelsAndSync];
}
} else if ([key isEqual:@"ldap_remove_button"]) {
UIAlertController *errView = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Warning", nil)
message:NSLocalizedString(@"Are you sure to want to remove your LDAP config?", nil)
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil)
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {}];
UIAlertAction* continueAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Yes", nil)
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[settingsStore removeLdap];
[self recomputeLdapLabelsAndSync];
[_settingsController.navigationController popViewControllerAnimated:NO];
}];
[errView addAction:defaultAction];
[errView addAction:continueAction];
[self presentViewController:errView animated:YES completion:nil];
}
}

View file

@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "FileTransferDelegate.h"
#import "LinphoneManager.h"
#import "PhoneMainView.h"
@ -115,12 +116,13 @@ static void file_transfer_progress_indication_send(LinphoneChatMessage *message,
linphone_content_set_subtype(content, [subtype UTF8String]);
linphone_content_set_name(content, [name UTF8String]);
linphone_content_set_file_path(content, [[LinphoneManager imagesDirectory] stringByAppendingPathComponent:name].UTF8String);
_message = rootMessage;
_message = rootMessage? : linphone_chat_room_create_empty_message(chatRoom);
linphone_chat_message_add_file_content(_message, content);
BOOL isOneToOneChat = linphone_chat_room_get_capabilities(chatRoom) & LinphoneChatRoomCapabilitiesOneToOne;
BOOL basic = [ChatConversationView isBasicChatRoom:linphone_chat_message_get_chat_room(rootMessage)];
const LinphoneAccountParams *params = linphone_account_get_params(linphone_core_get_default_account(LC));
BOOL cpimEnabled = linphone_account_params_cpim_in_basic_chat_room_enabled(params);
BOOL basic = [ChatConversationView isBasicChatRoom:linphone_chat_message_get_chat_room(_message)];
if (!basic && !isOneToOneChat && (_text!=nil && ![_text isEqualToString:@""]))
if ((!basic || cpimEnabled) && (_text!=nil && ![_text isEqualToString:@""]))
linphone_chat_message_add_utf8_text_content(_message, [_text UTF8String]);
linphone_content_unref(content);
@ -132,7 +134,7 @@ static void file_transfer_progress_indication_send(LinphoneChatMessage *message,
LOGI(@"%p Uploading content from message %p", self, _message);
linphone_chat_message_send(_message);
if (basic && !isOneToOneChat && (_text!=nil && ![_text isEqualToString:@""])) {
if (basic && !cpimEnabled && (_text!=nil && ![_text isEqualToString:@""])) {
linphone_chat_message_send(linphone_chat_room_create_message_from_utf8(linphone_chat_message_get_chat_room(rootMessage), _text.UTF8String));
}
}
@ -165,9 +167,10 @@ static void file_transfer_progress_indication_send(LinphoneChatMessage *message,
}
BOOL basic = [ChatConversationView isBasicChatRoom:linphone_chat_message_get_chat_room(rootMessage)];
const LinphoneAccountParams *params = linphone_account_get_params(linphone_core_get_default_account(LC));
BOOL cpimEnabled = linphone_account_params_cpim_in_basic_chat_room_enabled(params);
if (!basic && _text!=nil && ![_text isEqualToString:@""])
if ((!basic || cpimEnabled) && _text!=nil && ![_text isEqualToString:@""])
linphone_chat_message_add_utf8_text_content(_message, [_text UTF8String]);
// todo indication progress
@ -176,7 +179,7 @@ static void file_transfer_progress_indication_send(LinphoneChatMessage *message,
LOGI(@"%p Uploading content from message %p", self, _message);
linphone_chat_message_send(_message);
if (basic && _text!=nil && ![_text isEqualToString:@""]) {
if (basic && !cpimEnabled && _text!=nil && ![_text isEqualToString:@""]) {
linphone_chat_message_send(linphone_chat_room_create_message_from_utf8(linphone_chat_message_get_chat_room(rootMessage), _text.UTF8String));
}
}

View file

@ -124,7 +124,11 @@
- (void)deselectCell:(UITableViewCell *)cell {
[cell setAccessoryType:UITableViewCellAccessoryNone];
[[cell textLabel] setTextColor:[UIColor darkTextColor]];
if (@available(iOS 13.0, *)) {
[[cell textLabel] setTextColor:[UIColor labelColor]];
} else {
[[cell textLabel] setTextColor:[UIColor darkGrayColor]];
}
}
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section {

View file

@ -160,7 +160,7 @@ hiddenKeys = _hiddenKeys;
for (NSArray *specifiers in _dataSource) {
for (id sp in specifiers) {
if ([sp isKindOfClass:[IASKSpecifier class]]) {
if ([[sp key] isEqualToString:key]) {
if ([[(IASKSpecifier*)sp key] isEqualToString:key]) {
return sp;
}
}

View file

@ -5,7 +5,7 @@
#import <UIKit/UIkit.h>
#import "FastAddressBook.h"
#import "LinphoneManager.h"
#import "Log.h"
#import "AudioHelper.h"
#import "ChatConversationTableView.h"

View file

@ -1,11 +1,11 @@
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
platform :ios, '10.0'
source "https://gitlab.linphone.org/BC/public/podspec.git"
source "https://github.com/CocoaPods/Specs.git"
def all_pods
if ENV['PODFILE_PATH'].nil?
pod 'linphone-sdk', '~> 5.1.0-beta.69+950f104'
pod 'linphone-sdk', '~> 5.1.67'
else
pod 'linphone-sdk', :path => ENV['PODFILE_PATH'] # local sdk
end

View file

@ -11,6 +11,8 @@
<entry name="reg_sendregister" overwrite="true">1</entry>
<entry name="refkey" overwrite="true"></entry>
<entry name="realm" overwrite="true"></entry>
<entry name="push_notification_allowed" overwrite="true">0</entry>
<entry name="remote_push_notification_allowed" overwrite="true">0</entry>
</section>

View file

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Title</key>
<string>LDAP configs</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>new_ldap_button</string>
<key>Title</key>
<string>Add new LDAP config (5 max)</string>
<key>Type</key>
<string>IASKButtonSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_1</string>
<key>File</key>
<string>LDAP</string>
<key>Title</key>
<string>LDAP 1</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_2</string>
<key>File</key>
<string>LDAP</string>
<key>Title</key>
<string>LDAP 2</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_3</string>
<key>File</key>
<string>LDAP</string>
<key>Title</key>
<string>LDAP 3</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_4</string>
<key>File</key>
<string>LDAP</string>
<key>Title</key>
<string>LDAP 4</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_5</string>
<key>File</key>
<string>LDAP</string>
<key>Title</key>
<string>LDAP 5</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
</dict>
</array>
</dict>
</plist>

View file

@ -0,0 +1,318 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Enabled</string>
<key>Key</key>
<string>ldap_enabled</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Key</key>
<string>ldap_remove_button</string>
<key>Title</key>
<string>Delete this LDAP config</string>
<key>Type</key>
<string>IASKButtonSpecifier</string>
</dict>
<dict>
<key>Title</key>
<string>Connexion</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_server</string>
<key>Title</key>
<string>Server URL</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<false/>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_bind_dn</string>
<key>Title</key>
<string>Bind DN</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<false/>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<true/>
<key>Key</key>
<string>ldap_password</string>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>Title</key>
<string>Password</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<string>simple</string>
<key>Key</key>
<string>ldap_auth_method</string>
<key>Title</key>
<string>Authentication Method</string>
<key>Titles</key>
<array>
<string>Simple</string>
<string>Anonymous</string>
</array>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Values</key>
<array>
<string>simple</string>
<string>anonymous</string>
</array>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Use TLS</string>
<key>Key</key>
<string>ldap_tls_enabled</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>DefaultValue</key>
<string>simple</string>
<key>Key</key>
<string>ldap_certificates_verification_mode</string>
<key>Title</key>
<string>Certificate Verification</string>
<key>Titles</key>
<array>
<string>Auto</string>
<string>Enabled</string>
<string>Disabled</string>
</array>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Values</key>
<array>
<string>default</string>
<string>enabled</string>
<string>disabled</string>
</array>
</dict>
<dict>
<key>Title</key>
<string>Research</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_base_object</string>
<key>Title</key>
<string>Research Base</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<false/>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_filter</string>
<key>Title</key>
<string>Filter</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<false/>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_max_results</string>
<key>Title</key>
<string>Max results</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>KeyboardType</key>
<string>NumberPad</string>
<key>DefaultValue</key>
<integer>50</integer>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_timeout</string>
<key>Title</key>
<string>Timeout (seconds)</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>KeyboardType</key>
<string>NumberPad</string>
<key>DefaultValue</key>
<integer>5</integer>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_delay</string>
<key>Title</key>
<string>Delay (milliseconds)</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>KeyboardType</key>
<string>NumberPad</string>
<key>DefaultValue</key>
<integer>500</integer>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_min_chars</string>
<key>Title</key>
<string>Min chars</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>KeyboardType</key>
<string>NumberPad</string>
<key>DefaultValue</key>
<integer>3</integer>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>Title</key>
<string>Analysis</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_name_attribute</string>
<key>Title</key>
<string>Name Attributes</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<false/>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_sip_attribute</string>
<key>Title</key>
<string>SIP Attributes</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<false/>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>Key</key>
<string>ldap_sip_domain</string>
<key>Title</key>
<string>Domain</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<false/>
<key>IASKTextAlignment</key>
<string>IASKUITextAlignmentRight</string>
</dict>
<dict>
<key>Title</key>
<string>Miscellaneous</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Enabled</string>
<key>Key</key>
<string>ldap_logs_enabled</string>
<key>DefaultValue</key>
<true/>
</dict>
</array>
</dict>
</plist>

View file

@ -144,6 +144,16 @@
<key>Type</key>
<string>PSChildPaneSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>contacts_menu</string>
<key>File</key>
<string>Contacts</string>
<key>Title</key>
<string>Contacts</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
</dict>
<dict>
<key>File</key>
<string>Advanced</string>

View file

@ -621,13 +621,14 @@
63E27A321C4FECD000D332AE /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 63E27A311C4FECD000D332AE /* LaunchScreen.xib */; };
63E27A521C50EDB000D332AE /* hold.mkv in Resources */ = {isa = PBXBuildFile; fileRef = 63E27A511C50EB2700D332AE /* hold.mkv */; };
63E59A3F1ADE70D900646FB3 /* InAppProductsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E59A3E1ADE70D900646FB3 /* InAppProductsManager.m */; };
63E802DB1C625AEF000D5509 /* BuildFile in Resources */ = {isa = PBXBuildFile; };
63E802DB1C625AEF000D5509 /* (null) in Resources */ = {isa = PBXBuildFile; };
63EC8D391D7438660066547B /* AssistantLinkView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 63EC8D3B1D7438660066547B /* AssistantLinkView.xib */; };
63F1DF441BCE618E00EDED90 /* UIAddressTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F1DF431BCE618E00EDED90 /* UIAddressTextField.m */; };
63F1DF4B1BCE983200EDED90 /* CallConferenceTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F1DF4A1BCE983200EDED90 /* CallConferenceTableView.m */; };
63F1DF4F1BCE985F00EDED90 /* UICallConferenceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F1DF4D1BCE985F00EDED90 /* UICallConferenceCell.m */; };
63F1DF511BCE986A00EDED90 /* UICallConferenceCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 63F1DF531BCE986A00EDED90 /* UICallConferenceCell.xib */; };
63FB30351A680E73008CA393 /* UIRoundedImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 63FB30341A680E73008CA393 /* UIRoundedImageView.m */; };
662553B427EDFB35007F67D8 /* MagicSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 662553B327EDFB35007F67D8 /* MagicSearch.swift */; };
669B140827A1821F0012220A /* scroll_to_bottom_default.png in Resources */ = {isa = PBXBuildFile; fileRef = 669B140727A1821F0012220A /* scroll_to_bottom_default.png */; };
669B140C27A29D140012220A /* FloatingScrollDownButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 669B140B27A29D140012220A /* FloatingScrollDownButton.swift */; };
6F3A2542B1FC7C128439D37C /* Pods_linphone.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CFCC14A580A05DEC78090273 /* Pods_linphone.framework */; };
@ -1619,6 +1620,8 @@
63F1DF521BCE986A00EDED90 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UICallConferenceCell.xib; sourceTree = "<group>"; };
63FB30331A680E73008CA393 /* UIRoundedImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRoundedImageView.h; sourceTree = "<group>"; };
63FB30341A680E73008CA393 /* UIRoundedImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIRoundedImageView.m; sourceTree = "<group>"; };
662553B327EDFB35007F67D8 /* MagicSearch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagicSearch.swift; sourceTree = "<group>"; };
666D795E283E7E0300B07215 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
669B140727A1821F0012220A /* scroll_to_bottom_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = scroll_to_bottom_default.png; sourceTree = "<group>"; };
669B140B27A29D140012220A /* FloatingScrollDownButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloatingScrollDownButton.swift; sourceTree = "<group>"; };
70E542F213E147E3002BA2C0 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
@ -1634,7 +1637,6 @@
8C300D981E40E0CC00728EF3 /* lime_ko.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lime_ko.png; sourceTree = "<group>"; };
8C300D991E40E0CC00728EF3 /* lime_ko@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lime_ko@2x.png"; sourceTree = "<group>"; };
8C3EAA191EB8D9C300B732B6 /* linphonetester.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = linphonetester.framework; path = "liblinphone-sdk/apple-darwin/Frameworks/linphonetester.framework"; sourceTree = "<group>"; };
8C435FC320BD41C6004CCA25 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
8C5BCEC61EB3859200A9AAEF /* bctoolbox-tester.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "bctoolbox-tester.framework"; path = "liblinphone-sdk/apple-darwin/Frameworks/bctoolbox-tester.framework"; sourceTree = "<group>"; };
8C5D1B991D9BC48100DC6539 /* UIShopTableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIShopTableCell.h; sourceTree = "<group>"; };
8C5D1B9B1D9BC48100DC6539 /* UIShopTableCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UIShopTableCell.xib; sourceTree = "<group>"; };
@ -2098,6 +2100,7 @@
D3549815158761D0000081D8 /* ContactsListTableView.m */,
D35497FB15875372000081D8 /* ContactsListView.h */,
D35497FC15875372000081D8 /* ContactsListView.m */,
662553B327EDFB35007F67D8 /* MagicSearch.swift */,
D38187C015FE342800C3EDCA /* ContactsListView.xib */,
631098471D4660580041F2B3 /* CountryListView.h */,
631098481D4660580041F2B3 /* CountryListView.m */,
@ -2320,7 +2323,7 @@
path = LinphoneUI;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA = {
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
8C23BCB71D82AAC3005F19BB /* linphone.entitlements */,
@ -3047,7 +3050,6 @@
92EB6C052CF3AAD4193EAD31 /* Pods-msgNotificationService.distribution.xcconfig */,
E19FC645A566E91D4EEB9C8F /* Pods-msgNotificationService.distributionadhoc.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
@ -3394,7 +3396,7 @@
fr,
hu,
);
mainGroup = 29B97314FDCFA39411CA2CEA;
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */;
projectDirPath = "";
projectRoot = "";
@ -3457,7 +3459,7 @@
633FEED41D3CD55A0014B822 /* numpad_7_default@2x.png in Resources */,
633FEEE01D3CD55A0014B822 /* numpad_8_over~ipad@2x.png in Resources */,
633FEDDC1D3CD5590014B822 /* call_start_body_disabled~ipad.png in Resources */,
63E802DB1C625AEF000D5509 /* BuildFile in Resources */,
63E802DB1C625AEF000D5509 /* (null) in Resources */,
633FEE2E1D3CD5590014B822 /* color_F.png in Resources */,
633FEDC51D3CD5590014B822 /* call_hangup_disabled@2x.png in Resources */,
633FEEDF1D3CD55A0014B822 /* numpad_8_over~ipad.png in Resources */,
@ -4379,6 +4381,7 @@
D3807FFC15C2894A005BE9BC /* IASKPSTitleValueSpecifierViewCell.m in Sources */,
D3807FFE15C2894A005BE9BC /* IASKSlider.m in Sources */,
D380800015C2894A005BE9BC /* IASKSwitch.m in Sources */,
662553B427EDFB35007F67D8 /* MagicSearch.swift in Sources */,
D380800215C2894A005BE9BC /* IASKTextField.m in Sources */,
D380801315C299D0005BE9BC /* ColorSpaceUtilites.m in Sources */,
C64A854E2667B67200252AD2 /* EphemeralSettingsView.m in Sources */,
@ -4698,7 +4701,7 @@
63AADBCB1B6A0FF200AA16FD /* ja */,
63AADBDD1B6A0FF200AA16FD /* nl */,
63AADBE11B6A0FF200AA16FD /* ru */,
8C435FC320BD41C6004CCA25 /* fr */,
666D795E283E7E0300B07215 /* fr */,
);
name = Localizable.strings;
sourceTree = "<group>";
@ -5015,14 +5018,14 @@
IBC_MODULE = linphoneapp;
IBSC_MODULE = linphoneapp;
INFOPLIST_FILE = "linphone-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(BUILT_PRODUCTS_DIR)",
"$(inherited)",
);
LINK_WITH_STANDARD_LIBRARIES = YES;
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
OTHER_CFLAGS = (
"-DBCTBX_LOG_DOMAIN=\\\"ios\\\"",
"-DCHECK_VERSION_UPDATE=FALSE",
@ -5141,14 +5144,14 @@
IBC_MODULE = linphoneapp;
IBSC_MODULE = linphoneapp;
INFOPLIST_FILE = "linphone-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(BUILT_PRODUCTS_DIR)",
"$(inherited)",
);
LINK_WITH_STANDARD_LIBRARIES = YES;
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
OTHER_CFLAGS = (
"-DBCTBX_LOG_DOMAIN=\\\"ios\\\"",
"-DCHECK_VERSION_UPDATE=FALSE",
@ -5266,14 +5269,14 @@
IBC_MODULE = linphoneapp;
IBSC_MODULE = linphoneapp;
INFOPLIST_FILE = "linphone-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(BUILT_PRODUCTS_DIR)",
"$(inherited)",
);
LINK_WITH_STANDARD_LIBRARIES = YES;
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
OTHER_CFLAGS = (
"-DBCTBX_LOG_DOMAIN=\\\"ios\\\"",
"-DCHECK_VERSION_UPDATE=FALSE",
@ -5390,14 +5393,14 @@
IBC_MODULE = linphoneapp;
IBSC_MODULE = linphoneapp;
INFOPLIST_FILE = "linphone-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(BUILT_PRODUCTS_DIR)",
"$(inherited)",
);
LINK_WITH_STANDARD_LIBRARIES = YES;
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
OTHER_CFLAGS = (
"-DBCTBX_LOG_DOMAIN=\\\"ios\\\"",
"-DCHECK_VERSION_UPDATE=FALSE",
@ -5456,8 +5459,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = linphoneExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 4.6.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.linphone.phone.linphoneExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -5498,8 +5501,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = linphoneExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 4.6.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = org.linphone.phone.linphoneExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -5540,8 +5543,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = linphoneExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 4.6.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = org.linphone.phone.linphoneExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -5583,8 +5586,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = linphoneExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 4.6.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = org.linphone.phone.linphoneExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -5682,9 +5685,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = "$(SRCROOT)/msgNotificationService/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited)";
@ -5734,9 +5737,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = "$(SRCROOT)/msgNotificationService/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited)";
@ -5786,9 +5789,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = "$(SRCROOT)/msgNotificationService/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited)";
@ -5838,9 +5841,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = "$(SRCROOT)/msgNotificationService/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited)";
@ -5894,9 +5897,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = msgNotificationContent/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited)";
@ -5946,9 +5949,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = msgNotificationContent/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited)";
@ -5998,9 +6001,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = msgNotificationContent/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited)";
@ -6050,9 +6053,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = msgNotificationContent/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 4.6.0;
MARKETING_VERSION = 4.6.6;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited)";