mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Changes related to reachability feature moving into ios-platform-helpers
This commit is contained in:
parent
60fba52521
commit
da49a20fc9
4 changed files with 680 additions and 952 deletions
|
|
@ -431,7 +431,7 @@
|
|||
NSString *sipInstance = [aps objectForKey:@"uuid"];
|
||||
if (sipInstance && uuid && ![sipInstance isEqualToString:uuid]) {
|
||||
LOGE(@"Notification [%p] was intended for another device, ignoring it.", userInfo);
|
||||
LOGD(@"My sip instance is: [%@], push was intended for: [%@].", uuid, sipInstance);
|
||||
LOGD(@"My sip instance is: [%@], push was intended for: [%@].", uuid, sipInstance);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -443,8 +443,6 @@
|
|||
// As a result, break it and refresh registers in order to make sure to receive incoming INVITE or MESSAGE
|
||||
if (!linphone_core_is_network_reachable(LC)) {
|
||||
LOGI(@"Notification [%p] network is down, restarting it.", userInfo);
|
||||
LinphoneManager.instance.connectivity = none; // Force connectivity to be discovered again
|
||||
[LinphoneManager.instance setupNetworkReachabilityCallback];
|
||||
}
|
||||
|
||||
if ([callId isEqualToString:@""]) {
|
||||
|
|
@ -543,7 +541,6 @@
|
|||
- (void)processPush:(NSDictionary *)userInfo {
|
||||
LOGI(@"[PushKit] Notification [%p] received with pay load : %@", userInfo, userInfo.description);
|
||||
[self configureUINotification];
|
||||
[LinphoneManager.instance setupNetworkReachabilityCallback];
|
||||
//to avoid IOS to suspend the app before being able to launch long running task
|
||||
[self processRemoteNotification:userInfo];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -502,16 +502,12 @@
|
|||
|
||||
if (username && [username length] > 0 && domain && [domain length] > 0) {
|
||||
int expire = [self integerForKey:@"account_expire_preference"];
|
||||
BOOL isWifiOnly = [self boolForKey:@"wifi_only_preference"];
|
||||
BOOL pushnotification = [self boolForKey:@"account_pushnotification_preference"];
|
||||
NSString *prefix = [self stringForKey:@"account_prefix_preference"];
|
||||
NSString *proxyAddress = [self stringForKey:@"account_proxy_preference"];
|
||||
|
||||
const char *route = NULL;
|
||||
|
||||
if (isWifiOnly && LinphoneManager.instance.connectivity == wwan)
|
||||
expire = 0;
|
||||
|
||||
if ((!proxyAddress || [proxyAddress length] < 1) && domain) {
|
||||
proxyAddress = domain;
|
||||
}
|
||||
|
|
@ -810,8 +806,6 @@
|
|||
|
||||
BOOL wifiOnly = [self boolForKey:@"wifi_only_preference"];
|
||||
[lm lpConfigSetInt:wifiOnly forKey:@"wifi_only_preference"];
|
||||
if ([self valueChangedForKey:@"wifi_only_preference"])
|
||||
[LinphoneManager.instance setupNetworkReachabilityCallback];
|
||||
|
||||
LinphoneNatPolicy *LNP = linphone_core_get_nat_policy(LC);
|
||||
|
||||
|
|
|
|||
|
|
@ -68,12 +68,6 @@ typedef enum _NetworkType {
|
|||
network_wifi
|
||||
} NetworkType;
|
||||
|
||||
typedef enum _Connectivity {
|
||||
wifi,
|
||||
wwan,
|
||||
none
|
||||
} Connectivity;
|
||||
|
||||
extern const int kLinphoneAudioVbrCodecDefaultBitrate;
|
||||
|
||||
/* Application specific call context */
|
||||
|
|
@ -82,11 +76,6 @@ typedef struct _CallContext {
|
|||
bool_t cameraIsEnabled;
|
||||
} CallContext;
|
||||
|
||||
struct NetworkReachabilityContext {
|
||||
bool_t testWifi, testWWan;
|
||||
void (*networkStateChanged) (Connectivity newConnectivity);
|
||||
};
|
||||
|
||||
@interface LinphoneCallAppData :NSObject {
|
||||
@public
|
||||
bool_t batteryWarningShown;
|
||||
|
|
@ -107,8 +96,8 @@ typedef struct _LinphoneManagerSounds {
|
|||
|
||||
@private
|
||||
NSTimer* mIterateTimer;
|
||||
NSMutableArray* pushCallIDs;
|
||||
Connectivity connectivity;
|
||||
NSMutableArray* pushCallIDs;
|
||||
|
||||
UIBackgroundTaskIdentifier pausedCallBgTask;
|
||||
UIBackgroundTaskIdentifier incallBgTask;
|
||||
UIBackgroundTaskIdentifier pushBgTaskRefer;
|
||||
|
|
@ -148,8 +137,6 @@ typedef struct _LinphoneManagerSounds {
|
|||
- (void)alertLIME:(LinphoneChatRoom *)room;
|
||||
- (void)startPushLongRunningTask:(NSString *)loc_key callId:(NSString *)callId;
|
||||
+ (BOOL)langageDirectionIsRTL;
|
||||
+ (void)kickOffNetworkConnection;
|
||||
- (void)setupNetworkReachabilityCallback;
|
||||
|
||||
- (void)refreshRegisters;
|
||||
|
||||
|
|
@ -220,7 +207,6 @@ typedef struct _LinphoneManagerSounds {
|
|||
|
||||
@property (readonly) BOOL isTesting;
|
||||
@property(readonly, strong) FastAddressBook *fastAddressBook;
|
||||
@property Connectivity connectivity;
|
||||
@property (readonly) NetworkType network;
|
||||
@property (readonly) const char* frontCamId;
|
||||
@property (readonly) const char* backCamId;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue