mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Fix transport selection.
Fix conference creation and add feedback on status (light color next to start button)
This commit is contained in:
parent
b8d0fb5e46
commit
24e2f9f906
6 changed files with 40 additions and 14 deletions
|
|
@ -209,6 +209,7 @@ void ConferenceInfoModel::createConference(const int& securityLevel, const int&
|
|||
if( true || isScheduled()){
|
||||
mConferenceScheduler = ConferenceScheduler::create();
|
||||
connect(mConferenceScheduler.get(), &ConferenceScheduler::invitationsSent, this, &ConferenceInfoModel::onInvitationsSent);
|
||||
connect(mConferenceScheduler.get(), &ConferenceScheduler::stateChanged, this, &ConferenceInfoModel::onStateChanged);
|
||||
mConferenceScheduler->getConferenceScheduler()->setInfo(mConferenceInfo);
|
||||
}else{
|
||||
auto conferenceParameters = core->createConferenceParams(nullptr);
|
||||
|
|
@ -236,7 +237,14 @@ void ConferenceInfoModel::createConference(const int& securityLevel, const int&
|
|||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void ConferenceInfoModel::onStateChanged(linphone::ConferenceSchedulerState state){
|
||||
qWarning() << "ConferenceInfoModel::onStateChanged: " << (int) state;
|
||||
if( state == linphone::ConferenceSchedulerState::Ready)
|
||||
emit conferenceCreated();
|
||||
else if( state == linphone::ConferenceSchedulerState::Error)
|
||||
emit conferenceCreationFailed();
|
||||
}
|
||||
void ConferenceInfoModel::onInvitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations) {
|
||||
qWarning() << "ConferenceInfoModel::onInvitationsSent";
|
||||
emit invitationsSent();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
// SCHEDULER
|
||||
|
||||
//virtual void onStateChanged(const std::shared_ptr<linphone::ConferenceScheduler> & conferenceScheduler, linphone::ConferenceSchedulerState state) override;
|
||||
virtual void onStateChanged(linphone::ConferenceSchedulerState state);
|
||||
virtual void onInvitationsSent(const std::list<std::shared_ptr<linphone::Address>> & failedInvitations);
|
||||
|
||||
|
||||
|
|
@ -94,6 +94,7 @@ signals:
|
|||
void isScheduledChanged();
|
||||
|
||||
void conferenceCreated();
|
||||
void conferenceCreationFailed();
|
||||
void invitationsSent();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ std::shared_ptr<linphone::ConferenceScheduler> ConferenceScheduler::getConferenc
|
|||
}
|
||||
|
||||
void ConferenceScheduler::onStateChanged(linphone::ConferenceSchedulerState state) {
|
||||
emit stateChanged(state);
|
||||
qWarning() << "ConferenceScheduler::onStateChanged : " << (int)state;
|
||||
emit stateChanged(state);
|
||||
if( state == linphone::ConferenceSchedulerState::Ready) {
|
||||
std::shared_ptr<linphone::ChatRoomParams> params = CoreManager::getInstance()->getCore()->createDefaultChatRoomParams();
|
||||
params->setBackend(linphone::ChatRoomBackend::Basic);
|
||||
|
|
@ -62,5 +62,6 @@ void ConferenceScheduler::onStateChanged(linphone::ConferenceSchedulerState stat
|
|||
}
|
||||
|
||||
void ConferenceScheduler::onInvitationsSent( const std::list<std::shared_ptr<linphone::Address>> & failedInvitations) {
|
||||
qWarning() << "ConferenceScheduler::onInvitationsSent";
|
||||
emit invitationsSent(failedInvitations);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,9 +34,11 @@ ConferenceSchedulerListener::~ConferenceSchedulerListener () {
|
|||
|
||||
|
||||
void ConferenceSchedulerListener::onStateChanged(const std::shared_ptr<linphone::ConferenceScheduler> & conferenceScheduler, linphone::ConferenceSchedulerState state) {
|
||||
qWarning() << "ConferenceSchedulerListener::onStateChanged" << (int) state;
|
||||
emit stateChanged(state);
|
||||
}
|
||||
|
||||
void ConferenceSchedulerListener::onInvitationsSent(const std::shared_ptr<linphone::ConferenceScheduler> & conferenceScheduler, const std::list<std::shared_ptr<linphone::Address>> & failedInvitations) {
|
||||
qWarning() << "ConferenceSchedulerListener::onInvitationsSent";
|
||||
emit invitationsSent(failedInvitations);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,9 +108,10 @@ QString LinphoneEnums::toString(const LinphoneEnums::TransportType& type){
|
|||
void LinphoneEnums::fromString(const QString& transportType, LinphoneEnums::TransportType *transport){
|
||||
if (transportType.toUpper() == QLatin1String("TCP"))
|
||||
*transport = TransportTypeTcp;
|
||||
if (transportType.toUpper() == QLatin1String("UDP"))
|
||||
else if (transportType.toUpper() == QLatin1String("UDP"))
|
||||
*transport = TransportTypeUdp;
|
||||
if (transportType.toUpper() == QLatin1String("TLS"))
|
||||
else if (transportType.toUpper() == QLatin1String("TLS"))
|
||||
*transport = TransportTypeTls;
|
||||
*transport = TransportTypeDtls;
|
||||
}
|
||||
else
|
||||
*transport = TransportTypeDtls;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,13 @@ import 'qrc:/ui/scripts/Utils/utils.js' as Utils
|
|||
DialogPlus {
|
||||
id: conferenceManager
|
||||
property ConferenceInfoModel conferenceInfoModel: ConferenceInfoModel{
|
||||
onConferenceCreated: console.log("Conference has been created.")
|
||||
onConferenceCreated: {
|
||||
console.log("Conference has been created.")
|
||||
creationStatus.icon = 'led_green'
|
||||
}
|
||||
onConferenceCreationFailed:{ console.log("Conference failed.")
|
||||
creationStatus.icon = 'led_red'
|
||||
}
|
||||
onInvitationsSent: {
|
||||
console.log("Conference => invitations sent. Check in log for invite states.")
|
||||
exit(1)
|
||||
|
|
@ -106,9 +112,10 @@ DialogPlus {
|
|||
}
|
||||
|
||||
onClicked: {
|
||||
creationStatus.icon = 'led_orange'
|
||||
conferenceInfoModel.isScheduled = scheduledSwitch.checked
|
||||
if( scheduledSwitch.checked){
|
||||
var startDateTime = Utils.buidDate(dateField.getDate(), timeField.getTime())
|
||||
var startDateTime = Utils.buildDate(dateField.getDate(), timeField.getTime())
|
||||
startDateTime.setSeconds(0)
|
||||
conferenceInfoModel.dateTime = startDateTime
|
||||
conferenceInfoModel.duration = durationField.text
|
||||
|
|
@ -143,7 +150,13 @@ DialogPlus {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
, Icon{
|
||||
id: creationStatus
|
||||
height: 10
|
||||
width: 10
|
||||
visible: icon != ''
|
||||
icon: ''
|
||||
}
|
||||
]
|
||||
|
||||
buttonsAlignment: Qt.AlignRight
|
||||
|
|
@ -542,4 +555,4 @@ DialogPlus {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue