Removed retired Class UIVideoButton

This commit is contained in:
Christophe Deschamps 2022-09-13 11:34:43 +02:00
parent 44c2e97f92
commit 9439819ca4
3 changed files with 0 additions and 150 deletions

View file

@ -1,29 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import <UIKit/UIKit.h>
#import "UIToggleButton.h"
@interface UIVideoButton : UIToggleButton<UIToggleButtonDelegate> {
}
@property(nonatomic, strong) IBOutlet UIActivityIndicatorView *waitView;
@end

View file

@ -1,115 +0,0 @@
/*
* Copyright (c) 2010-2020 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "linphoneapp-Swift.h"
#import "UIVideoButton.h"
#include "LinphoneManager.h"
#import "Log.h"
@implementation UIVideoButton {
BOOL last_update_state;
}
@synthesize waitView;
INIT_WITH_COMMON_CF {
last_update_state = FALSE;
return self;
}
- (void)onOn {
if (!linphone_core_video_display_enabled(LC))
return;
[self setEnabled:FALSE];
[waitView startAnimating];
LinphoneCall *call = linphone_core_get_current_call(LC);
if (call) {
CallAppData *data = [CallManager getAppDataWithCall:call];
data.videoRequested = TRUE;/* will be used later to notify user if video was not activated because of the linphone core*/
[CallManager setAppDataWithCall:call appData:data];
LinphoneCallParams *call_params = linphone_core_create_call_params(LC,call);
linphone_call_params_enable_video(call_params, TRUE);
linphone_call_update(call, call_params);
linphone_call_params_unref(call_params);
} else if (self.inAudioConf) {
LinphoneConferenceParams *cp = linphone_core_create_conference_params(LC);
linphone_conference_params_set_video_enabled(cp, true);
linphone_conference_update_params(linphone_core_get_conference(LC), cp);
} else {
LOGW(@"Cannot toggle video button, because no current call");
}
}
- (void)onOff {
if (!linphone_core_video_display_enabled(LC))
return;
[CallManager.instance changeRouteToDefault];
//[CallManager.instance enableSpeakerWithEnable:FALSE];
[self setEnabled:FALSE];
[waitView startAnimating];
LinphoneCall *call = linphone_core_get_current_call(LC);
if (call) {
LinphoneCallParams *call_params = linphone_core_create_call_params(LC,call);
linphone_call_params_enable_video(call_params, FALSE);
linphone_core_update_call(LC, call, call_params);
linphone_call_params_unref(call_params);
} else if (self.inVideoConf) {
LinphoneConferenceParams *cp = linphone_core_create_conference_params(LC);
linphone_conference_params_set_video_enabled(cp, false);
linphone_conference_update_params(linphone_core_get_conference(LC), cp);
} else {
LOGW(@"Cannot toggle video button, because no current call or no video conference");
}
}
- (bool)onUpdate {
bool video_enabled = false;
LinphoneCall *currentCall = linphone_core_get_current_call(LC);
if (linphone_core_video_supported(LC)) {
if (self.inAudioConf || self.inVideoConf || (linphone_core_video_display_enabled(LC) && currentCall && !linphone_core_sound_resources_locked(LC) &&
linphone_call_get_state(currentCall) == LinphoneCallStreamsRunning)){
video_enabled = TRUE;
}
}
[self setEnabled:video_enabled];
if (last_update_state != video_enabled)
[waitView stopAnimating];
if (video_enabled) {
video_enabled = self.inVideoConf || (currentCall && linphone_call_params_video_enabled(linphone_call_get_current_params(currentCall)));
}
last_update_state = video_enabled;
return video_enabled;
}
-(BOOL) inVideoConf {
return (linphone_core_is_in_conference(LC) && linphone_core_get_conference(LC) != nil && linphone_conference_params_is_video_enabled(linphone_conference_get_current_params(linphone_core_get_conference(LC))));
}
-(BOOL) inAudioConf {
return (linphone_core_is_in_conference(LC) && linphone_core_get_conference(LC) != nil && !linphone_conference_params_is_video_enabled(linphone_conference_get_current_params(linphone_core_get_conference(LC))));
}
@end

View file

@ -50,7 +50,6 @@
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
308C3FD5D6C427D5592A2CD6 /* Pods_msgNotificationContent.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AB0AB106BE1526DC105F515 /* Pods_msgNotificationContent.framework */; };
340751971506459A00B89C47 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340751961506459A00B89C47 /* CoreTelephony.framework */; };
340751E7150F38FD00B89C47 /* UIVideoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 340751E6150F38FD00B89C47 /* UIVideoButton.m */; };
344ABDF114850AE9007420B6 /* libc++.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 344ABDEF14850AE9007420B6 /* libc++.1.dylib */; settings = {ATTRIBUTES = (Weak, ); }; };
570742581D5A0691004B9C84 /* ShopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 570742561D5A0691004B9C84 /* ShopView.xib */; };
570742611D5A09B8004B9C84 /* ShopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5707425F1D5A09B8004B9C84 /* ShopView.m */; };
@ -1069,8 +1068,6 @@
2C8BC293C1C17F27AB5A93B1 /* Pods-msgNotificationContent.distributionadhoc.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-msgNotificationContent.distributionadhoc.xcconfig"; path = "Target Support Files/Pods-msgNotificationContent/Pods-msgNotificationContent.distributionadhoc.xcconfig"; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* linphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linphone_Prefix.pch; sourceTree = "<group>"; };
340751961506459A00B89C47 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
340751E5150F38FC00B89C47 /* UIVideoButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVideoButton.h; sourceTree = "<group>"; };
340751E6150F38FD00B89C47 /* UIVideoButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIVideoButton.m; sourceTree = "<group>"; };
344ABDEF14850AE9007420B6 /* libc++.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.1.dylib"; path = "usr/lib/libc++.1.dylib"; sourceTree = SDKROOT; };
344ABDF014850AE9007420B6 /* libstdc++.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.6.dylib"; path = "usr/lib/libstdc++.6.dylib"; sourceTree = SDKROOT; };
4DF6C8E3533E18B9BDDF7F15 /* Pods-msgNotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-msgNotificationService.debug.xcconfig"; path = "Target Support Files/Pods-msgNotificationService/Pods-msgNotificationService.debug.xcconfig"; sourceTree = "<group>"; };
@ -2535,8 +2532,6 @@
F03CA84218C72F1A0008889D /* UITextViewNoDefine.m */,
D32648421588F6FA00930C67 /* UIToggleButton.h */,
D32648431588F6FB00930C67 /* UIToggleButton.m */,
340751E5150F38FC00B89C47 /* UIVideoButton.h */,
340751E6150F38FD00B89C47 /* UIVideoButton.m */,
24A345A51D95798A00881A5C /* UIShopTableCell.m */,
24A3459D1D95797700881A5C /* UIShopTableCell.xib */,
);
@ -4961,7 +4956,6 @@
C63F7215285A24B10066163B /* ConferenceWaitingRoomFragment.swift in Sources */,
63423C0A1C4501D000D9A050 /* Contact.m in Sources */,
C63F7262285A24B10066163B /* RotatingSpinner.swift in Sources */,
340751E7150F38FD00B89C47 /* UIVideoButton.m in Sources */,
C63F723A285A24B10066163B /* CallData.swift in Sources */,
CF7602D7210867E800749F76 /* RecordingsListView.m in Sources */,
C63F7226285A24B10066163B /* UIVIewExtensions.swift in Sources */,