diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts
index 48c5aab62..375bbc7d6 100644
--- a/linphone-app/assets/languages/da.ts
+++ b/linphone-app/assets/languages/da.ts
@@ -1543,6 +1543,90 @@ Klik her: <a href="%1">%1</a>
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+
+
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+
+
+Notice
diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts
index 7916a2717..30d2db494 100644
--- a/linphone-app/assets/languages/de.ts
+++ b/linphone-app/assets/languages/de.ts
@@ -1543,6 +1543,90 @@ Klicken Sie hier: <a href="%1">%1</a>
Letzte Kontakte
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+ ABBRECHEN
+
+
+ startButton
+ 'Launch' : Start button
+ START
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+ Sie müssen ein Thema eintragen.
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+ Sie benötigen mindestens %1 Teilnehmer.
+ Sie benötigen mindestens %1 Teilnehmer.
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+ Sie müssen eine Konferenz-URI in den Kontoeinstellungen festlegen um einen konferenzbasierten Chatraum zu erstellen.
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+ Betreff
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+ Betreff eingeben
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+ Aktuelles Thema des Chatraums. Darf nicht leer sein.
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+ Möchten Sie den Chat verschlüsseln?
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+ Wähle Teilnehmer
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+ In Kontakten suchen oder einen eigenen zum Chatraum hinzufügen.
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+ Administrator
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+ Teilnehmer aus Auswahl entfernen
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+ Erforderlich
+
+Notice
diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts
index ba43995e2..d83a142a0 100644
--- a/linphone-app/assets/languages/en.ts
+++ b/linphone-app/assets/languages/en.ts
@@ -1543,6 +1543,90 @@ Click here: <a href="%1">%1</a>
Recent contacts
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+ CANCEL
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+ You need to fill a subject.
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+ You need at least %1 participant.
+ You need at least %1 participants.
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+ You need to set the conference URI in your account settings to create a conference based chat room.
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+ Subject
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+ Give a subject
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+ Current subject of the Chat Room. It cannot be empty.
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+ Would you like to encrypt your chat?
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+ Select participants
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+ Search in your contacts or add a custom one to the chat room.
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+ Admin
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+ Remove this participant from the selection
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+ Required
+
+Notice
diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts
index 2c195c471..9e7fae26a 100644
--- a/linphone-app/assets/languages/es.ts
+++ b/linphone-app/assets/languages/es.ts
@@ -1543,6 +1543,90 @@ Haga clic aquí: <a href="%1">%1 </a>
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+
+
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+
+
+Notice
diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts
index 5d12e998e..73e851847 100644
--- a/linphone-app/assets/languages/fr_FR.ts
+++ b/linphone-app/assets/languages/fr_FR.ts
@@ -1543,6 +1543,90 @@ Cliquez ici : <a href="%1">%1</a>
Contacts récents
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+ ANNULER
+
+
+ startButton
+ 'Launch' : Start button
+ LANCER
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+ Vous devez définir un sujet.
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+ Vous devez ajouter au moins %1 participant.
+ Vous devez ajouter au moins %1 participants.
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+ Vous devez définir l'URI de la conférence dans les paramètres de votre compte pour créer une conférence.
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+ Sujet
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+ Définissez un sujet
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+ Sujet de la conversation. Il ne peut pas être vide.
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+ Voulez-vous chiffrer votre conversation ?
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+ Choisissez les participants
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+ Chercher dans vos contacts ou ajouter à la main dans la conversation.
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+ Admin
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+ Enlever ce participant de la sélection
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+ Obligatoire
+
+Notice
diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts
index a9f2708a1..1c703f6c5 100644
--- a/linphone-app/assets/languages/hu.ts
+++ b/linphone-app/assets/languages/hu.ts
@@ -1533,6 +1533,89 @@ Kattintson ide: <a href="%1">%1</a>
Legutóbbi névjegyek
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+ Mégse
+
+
+ startButton
+ 'Launch' : Start button
+ Indítás
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+ Ki kell töltenie egy témát.
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+ Legalább %1 résztvevő szükséges.
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+ Konferenciaalapú csevegőszoba létrehozásához be kell állítania a konferencia URI-címét a fiókbeállításokban.
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+ Téma
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+ Téma hozzáadása
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+ A csevegőszoba jelenlegi témája. Nem lehet üres.
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+ Szeretné titkosítani a csevegését?
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+ Résztvevők kiválasztása
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+ Keressen a névjegyek között vagy adjon hozzá egy egyediet a csevegőszobához.
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+ Felügyelet
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+ Távolítsa el ezt a résztvevőt a kiválasztásból
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+ Kötelező
+
+Notice
diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts
index b5c57b01e..0d8f5103b 100644
--- a/linphone-app/assets/languages/it.ts
+++ b/linphone-app/assets/languages/it.ts
@@ -1543,6 +1543,90 @@ Clicca: <a href="%1">%1</a>
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+
+
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+
+
+Notice
diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts
index 07c8d13bf..595a5cb06 100644
--- a/linphone-app/assets/languages/ja.ts
+++ b/linphone-app/assets/languages/ja.ts
@@ -1533,6 +1533,89 @@
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+
+
+Notice
diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts
index fa6c7ef0a..39b5829b3 100644
--- a/linphone-app/assets/languages/lt.ts
+++ b/linphone-app/assets/languages/lt.ts
@@ -1553,6 +1553,91 @@ Spustelėkite čia: <a href="%1">%1</a>
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+
+
+
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+
+
+Notice
diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts
index 5502f32e9..446c36e11 100644
--- a/linphone-app/assets/languages/pt_BR.ts
+++ b/linphone-app/assets/languages/pt_BR.ts
@@ -1543,6 +1543,90 @@ Clique aqui: <a href="%1">%1 </a>
Contatos recentes
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+ CANCELAR
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+ Você precisa preencher um assunto.
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+ Você precisa de pelo menos %1 participante.
+ Você precisa de pelo menos %1 participantes.
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+ Você precisa definir o URI da conferência nas configurações da sua conta para criar uma sala de bate-papo baseada em conferência.
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+ Assunto
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+ Dê um assunto
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+ Assunto atual da sala de bate-papo. Não pode estar vazio.
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+ Você gostaria de criptografar seu bate-papo?
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+ Selecionar os participantes
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+ Pesquise em seus contatos ou adicione um personalizado à sala de chat.
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+ Admin
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+ Remover este participante da seleção
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+ Obrigatório
+
+Notice
diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts
index becb77c7c..38afc7369 100644
--- a/linphone-app/assets/languages/ru.ts
+++ b/linphone-app/assets/languages/ru.ts
@@ -1553,6 +1553,91 @@
Недавние контакты
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+
+
+
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+
+
+Notice
diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts
index a0c93a410..68706bcb3 100644
--- a/linphone-app/assets/languages/sv.ts
+++ b/linphone-app/assets/languages/sv.ts
@@ -1543,6 +1543,90 @@ Klicka här: <a href="%1">%1</a>
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+
+
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+
+
+Notice
diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts
index fa0949630..53f1224fe 100644
--- a/linphone-app/assets/languages/tr.ts
+++ b/linphone-app/assets/languages/tr.ts
@@ -1539,6 +1539,89 @@ Buraya tıklayın: <a href="%1">%1</a>
Son kişiler
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+
+
+Notice
diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts
index 9b5035f25..c41d2e99c 100644
--- a/linphone-app/assets/languages/uk.ts
+++ b/linphone-app/assets/languages/uk.ts
@@ -1553,6 +1553,91 @@
+
+ NewConference
+
+ cancelButton
+ 'Cancel' : Cancel button
+
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+
+
+
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+
+ Explanation about the subject of the chat room
+
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+
+
+Notice
diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts
index 859b86dbb..7c3fee755 100644
--- a/linphone-app/assets/languages/zh_CN.ts
+++ b/linphone-app/assets/languages/zh_CN.ts
@@ -1533,6 +1533,89 @@
最近联系人
+
+ NewConference
+
+ askEncryption
+ 'Would you like to encrypt your conference?' : Ask about setting the conference as secured.
+ 是否加密你的聊天?
+
+
+ cancelButton
+ 'Cancel' : Cancel button
+ 取消
+
+
+ startButton
+ 'Launch' : Start button
+
+
+
+ missingSubject
+ 'You need to fill a subject.' : Tooltip to warn a user on missing field.
+ 你需要填写一个主题。
+
+
+ missingParticipants
+ 'You need at least %1 participant.' : Tooltip to warn a user that there are not enough participants for the chat creation.
+
+ 你需要至少%1成员
+
+
+
+ missingConferenceURI
+ 'You need to set the conference URI in your account settings to create a conference based chat room.' : Tooltip to warn the user that a setting is missong in its configuration.
+ 您需要在帐户设置中设置会议 URI 以创建基于会议的聊天室。
+
+
+ newConferenceTitle
+ 'Start a video conference' : Title of a popup about creation of a video conference
+
+
+
+ subjectLabel
+ 'Subject' : Label of a text field about the subject of the chat room
+ 主题
+
+
+ subjectPlaceholder
+ 'Give a subject' : Placeholder in a form about setting a subject
+ 指定一个主题
+
+
+ subjectTooltip
+ 'Current subject of the Chat Room. It cannot be empty'
+ 聊天室的当前主题。 它不能为空。
+ Explanation about the subject of the chat room
+
+
+ participantSelectionPlaceholder
+ 'Select participants' : Placeholder for a search on participant to add them in selection.
+ 选择成员
+
+
+ participantSelectionTooltip
+ 'Search in your contacts or add a custom one to the chat room.'
+ 搜索您的联系人或向聊天室添加自定义联系人。
+
+
+ adminStatus
+ 'Admin' : Admin(istrator)
+ 管理员
+ word for admin status
+
+
+ removeParticipantSelection
+ 'Remove this participant from the selection' : Explanation about removing participant from a selection
+ 从选择中删除此成员
+ This is a tooltip
+
+
+ requiredField
+ 'Required' : Word relative to a star to explain that it is a requirement (Field form)
+ 要求
+
+Notice
diff --git a/linphone-app/resources.qrc b/linphone-app/resources.qrc
index 61ffa4d41..b1661b964 100644
--- a/linphone-app/resources.qrc
+++ b/linphone-app/resources.qrc
@@ -20,6 +20,7 @@
assets/images/call_custom.svgassets/images/call_history_custom.svgassets/images/call_quality_custom.svg
+ assets/images/call_menu_custom.svgassets/images/call_sign_connected.svgassets/images/call_sign_ended.svgassets/images/call_sign_incoming.svg
@@ -49,6 +50,7 @@
assets/images/chat_room_custom.svgassets/images/close_custom.svgassets/images/collapsed_custom.svg
+ assets/images/conference_custom.svgassets/images/contact_add_custom.svgassets/images/contact_card_photo_custom.svgassets/images/contact_custom.svg
@@ -60,6 +62,7 @@
assets/images/current_account_status_offline.svgassets/images/current_account_status_dnd.svgassets/images/current_account_status_busy.svg
+ assets/images/dialpad_custom.svgassets/images/declined_incoming_call_custom.svgassets/images/declined_outgoing_call_custom.svgassets/images/delete_custom.svg
@@ -103,7 +106,6 @@
assets/images/move_to_bottom_custom.svgassets/images/new_call_custom.svgassets/images/new_chat_group_custom.svg
- assets/images/new_conference_custom.svgassets/images/options_custom.svgassets/images/outgoing_call_custom.svgassets/images/panel_arrow_custom.svg
@@ -113,13 +115,16 @@
assets/images/panel_shown_normal.svgassets/images/panel_shown_hovered.svgassets/images/panel_shown_pressed.svg
+ assets/images/participants_custom.svgassets/images/pause_custom.svgassets/images/play_custom.svgassets/images/recording_sign.svgassets/images/record_custom.svgassets/images/remove_participant_custom.svg
+ assets/images/screen_sharing_custom.svgassets/images/screenshot_custom.svgassets/images/search_custom.svg
+ assets/images/schedule_custom.svgassets/images/secure_level_unsafe.svgassets/images/secure_level_1.svgassets/images/secure_level_2.svg
@@ -178,6 +183,7 @@
ui/modules/Common/Form/ListForm.qmlui/modules/Common/Form/ListItemSelector.jsui/modules/Common/Form/ListItemSelector.qml
+ ui/modules/Common/Form/Mosaic.qmlui/modules/Common/Form/MouseArea.qmlui/modules/Common/Form/Placements/FormEmptyLine.qmlui/modules/Common/Form/Placements/FormGroup.qml
@@ -212,6 +218,8 @@
ui/modules/Common/Misc/Borders.qmlui/modules/Common/Misc/ForceScrollBar.qmlui/modules/Common/Misc/Paned.qml
+ ui/modules/Common/Picker/DatePicker.qml
+ ui/modules/Common/Picker/TimePicker.qmlui/modules/Common/Popup/DesktopPopup.qmlui/modules/Common/Popup/Popup.qmlui/modules/Common/Popup/PopupShadow.qml
@@ -254,6 +262,8 @@
ui/modules/Common/Styles/Menus/MenuStyle.qmlui/modules/Common/Styles/Misc/ForceScrollBarStyle.qmlui/modules/Common/Styles/Misc/PanedStyle.qml
+ ui/modules/Common/Styles/Picker/DatePickerStyle.qml
+ ui/modules/Common/Styles/Picker/TimePickerStyle.qmlui/modules/Common/Styles/Popup/PopupStyle.qmlui/modules/Common/Styles/qmldirui/modules/Common/Styles/Tooltip/TooltipStyle.qml
@@ -371,6 +381,7 @@
ui/views/App/Calls/CallsWindow.jsui/views/App/Calls/CallsWindow.qmlui/views/App/Calls/Conference.qml
+ ui/views/App/Calls/VideoConference.qmlui/views/App/Calls/Dialogs/CallSipAddress.qmlui/views/App/Calls/Dialogs/CallTransfer.qmlui/views/App/Calls/Dialogs/ConferenceManager.qml
@@ -396,6 +407,7 @@
ui/views/App/Main/Assistant/UseAppSipAccountWithPhoneNumber.qmlui/views/App/Main/Assistant/UseAppSipAccountWithUsername.qmlui/views/App/Main/Assistant/UseOtherSipAccount.qml
+ ui/views/App/Main/Conferences.qmlui/views/App/Main/ContactEdit.jsui/views/App/Main/ContactEdit.qmlui/views/App/Main/Contacts.qml
@@ -410,6 +422,7 @@
ui/views/App/Main/Dialogs/ManageAccount.jsui/views/App/Main/Dialogs/ManageAccounts.qmlui/views/App/Main/Dialogs/NewChatRoom.qml
+ ui/views/App/Main/Dialogs/NewConference.qmlui/views/App/Main/Dialogs/ParticipantsDevices.qmlui/views/App/Main/Home.qmlui/views/App/Main/HistoryView.qml
@@ -441,6 +454,7 @@
ui/views/App/Styles/Calls/CallFullscreenStyle.qmlui/views/App/Styles/Calls/CallsWindowStyle.qmlui/views/App/Styles/Calls/ConferenceStyle.qml
+ ui/views/App/Styles/Calls/VideoConferenceStyle.qmlui/views/App/Styles/Calls/Dialogs/CallSipAddressStyle.qmlui/views/App/Styles/Calls/Dialogs/CallTransferStyle.qmlui/views/App/Styles/Calls/Dialogs/ConferenceManagerStyle.qml
@@ -452,6 +466,7 @@
ui/views/App/Styles/Main/Assistant/CreateAppSipAccountStyle.qmlui/views/App/Styles/Main/AssistantStyle.qmlui/views/App/Styles/Main/Assistant/UseAppSipAccountStyle.qml
+ ui/views/App/Styles/Main/ConferencesStyle.qmlui/views/App/Styles/Main/ContactEditStyle.qmlui/views/App/Styles/Main/ContactsStyle.qmlui/views/App/Styles/Main/ConversationStyle.qml
@@ -461,6 +476,7 @@
ui/views/App/Styles/Main/Dialogs/InfoChatRoomStyle.qmlui/views/App/Styles/Main/Dialogs/InfoEncryptionStyle.qmlui/views/App/Styles/Main/Dialogs/NewChatRoomStyle.qml
+ ui/views/App/Styles/Main/Dialogs/NewConferenceStyle.qmlui/views/App/Styles/Main/Dialogs/ManageAccountsStyle.qmlui/views/App/Styles/Main/Dialogs/ParticipantsDevicesStyle.qmlui/views/App/Styles/Main/HomeStyle.qml
diff --git a/linphone-app/src/app/App.cpp b/linphone-app/src/app/App.cpp
index bfa72c94d..4d44a7337 100644
--- a/linphone-app/src/app/App.cpp
+++ b/linphone-app/src/app/App.cpp
@@ -343,6 +343,9 @@ void App::initContentApp () {
// Change colors if necessary.
mColorListModel->useConfig(config);
mImageListModel->useConfig(config);
+// There is no more database for callback. Setting it in the configuration before starting the core will do migration.
+// When the migration is done by SDK, further migrations on call logs will do nothing. It is safe to use .
+ config->setString("storage", "call_logs_db_uri", Paths::getCallHistoryFilePath());
// Init core.
CoreManager::init(this, Utils::coreStringToAppString(configPath));
@@ -611,6 +614,7 @@ void App::registerTypes () {
qRegisterMetaType>();
qRegisterMetaType>();
qRegisterMetaType>();
+ qRegisterMetaType>();
//qRegisterMetaType>();
LinphoneEnums::registerMetaTypes();
@@ -621,7 +625,9 @@ void App::registerTypes () {
registerType("CameraPreview");
registerType("ChatRoomProxyModel");
registerType("ConferenceHelperModel");
- registerType("ConferenceModel");
+ registerType("ConferenceProxyModel");
+ registerType("ConferenceInfoModel");
+ registerType("ConferenceInfoProxyModel");
registerType("ContactsListProxyModel");
registerType("ContactsImporterListProxyModel");
registerType("ContentProxyModel");
@@ -659,6 +665,8 @@ void App::registerTypes () {
registerUncreatableType("ColorModel");
registerUncreatableType("ImageModel");
registerUncreatableType("ConferenceAddModel");
+ registerUncreatableType("ConferenceModel");
+ registerUncreatableType("ConferenceInfoListModel");
registerUncreatableType("ContactModel");
registerUncreatableType("ContactsImporterModel");
registerUncreatableType("ContentModel");
diff --git a/linphone-app/src/components/Components.hpp b/linphone-app/src/components/Components.hpp
index 8e8f4f3d0..f518166ac 100644
--- a/linphone-app/src/components/Components.hpp
+++ b/linphone-app/src/components/Components.hpp
@@ -36,6 +36,10 @@
#include "codecs/VideoCodecsModel.hpp"
#include "conference/ConferenceAddModel.hpp"
#include "conference/ConferenceModel.hpp"
+#include "conference/ConferenceProxyModel.hpp"
+#include "conferenceInfo/ConferenceInfoModel.hpp"
+#include "conferenceInfo/ConferenceInfoListModel.hpp"
+#include "conferenceInfo/ConferenceInfoProxyModel.hpp"
#include "contact/ContactModel.hpp"
#include "contact/VcardModel.hpp"
#include "contacts/ContactsListModel.hpp"
diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp
index a76121298..2c92f8ae2 100644
--- a/linphone-app/src/components/call/CallModel.cpp
+++ b/linphone-app/src/components/call/CallModel.cpp
@@ -27,6 +27,7 @@
#include "app/App.hpp"
#include "components/calls/CallsListModel.hpp"
#include "components/chat-room/ChatRoomModel.hpp"
+#include "components/conference/ConferenceModel.hpp"
#include "components/contact/ContactModel.hpp"
#include "components/contacts/ContactsListModel.hpp"
#include "components/core/CoreHandlers.hpp"
@@ -49,9 +50,10 @@ constexpr char AutoAnswerObjectName[] = "auto-answer-timer";
}
CallModel::CallModel (shared_ptr call){
- Q_CHECK_PTR(call);
+
mCall = call;
- mCall->setData("call-model", *this);
+ if(mCall)
+ mCall->setData("call-model", *this);
updateIsInConference();
@@ -82,13 +84,18 @@ CallModel::CallModel (shared_ptr call){
QObject::connect(mSearch.get(), SIGNAL(searchReceived(std::list> )), this, SLOT(searchReceived(std::list>)));
mMagicSearch->addListener(mSearch);
- mRemoteAddress = mCall->getRemoteAddress()->clone();
+ if(mCall) {
+ mRemoteAddress = mCall->getRemoteAddress()->clone();
+ if(mCall->getConference())
+ mConferenceModel = std::make_shared(mCall->getConference());
+ }
mMagicSearch->getContactListFromFilterAsync(mRemoteAddress->getUsername(),mRemoteAddress->getDomain());
}
CallModel::~CallModel () {
mMagicSearch->removeListener(mSearch);
- mCall->unsetData("call-model");
+ if(mCall)
+ mCall->unsetData("call-model");
}
// -----------------------------------------------------------------------------
@@ -98,7 +105,7 @@ QString CallModel::getPeerAddress () const {
}
QString CallModel::getLocalAddress () const {
- return Utils::coreStringToAppString(mCall->getCallLog()->getLocalAddress()->asStringUriOnly());
+ return mCall ? Utils::coreStringToAppString(mCall->getCallLog()->getLocalAddress()->asStringUriOnly()) : "";
}
QString CallModel::getFullPeerAddress () const {
@@ -106,17 +113,17 @@ QString CallModel::getFullPeerAddress () const {
}
QString CallModel::getFullLocalAddress () const {
- return Utils::coreStringToAppString(mCall->getCallLog()->getLocalAddress()->asString());
+ return mCall ? Utils::coreStringToAppString(mCall->getCallLog()->getLocalAddress()->asString()) : "";
}
// -----------------------------------------------------------------------------
ContactModel *CallModel::getContactModel() const{
- QString cleanedAddress = Utils::cleanSipAddress(Utils::coreStringToAppString(mCall->getRemoteAddress()->asString()));
+ QString cleanedAddress = mCall ? Utils::cleanSipAddress(Utils::coreStringToAppString(mCall->getRemoteAddress()->asString())) : "";
return CoreManager::getInstance()->getContactsListModel()->findContactModelFromSipAddress(cleanedAddress);
}
ChatRoomModel * CallModel::getChatRoomModel() const{
- if(mCall->getCallLog()->getCallId() != "") {
+ if(mCall && mCall->getCallLog()->getCallId() != "") {
auto currentParams = mCall->getCurrentParams();
bool isEncrypted = currentParams->getMediaEncryption() != linphone::MediaEncryption::None;
SettingsModel * settingsModel = CoreManager::getInstance()->getSettingsModel();
@@ -154,6 +161,14 @@ ChatRoomModel * CallModel::getChatRoomModel() const{
return nullptr;
}
+std::shared_ptr CallModel::getConferenceModel() const{
+ return mConferenceModel;
+}
+
+bool CallModel::isConference () const{
+ return mCall->getConference() != nullptr;
+}
+
// -----------------------------------------------------------------------------
void CallModel::setRecordFile (const shared_ptr &callParams) {
callParams->setRecordFile(Utils::appStringToCoreString(
@@ -199,7 +214,7 @@ void CallModel::updateStats (const shared_ptr &callSt
// -----------------------------------------------------------------------------
float CallModel::getSpeakerVolumeGain () const {
- float gain = mCall->getSpeakerVolumeGain();
+ float gain = mCall ? mCall->getSpeakerVolumeGain() : 0;
if( gain < 0)
gain = CoreManager::getInstance()->getSettingsModel()->getPlaybackGain();
return gain;
@@ -207,7 +222,7 @@ float CallModel::getSpeakerVolumeGain () const {
void CallModel::setSpeakerVolumeGain (float volume) {
Q_ASSERT(volume >= 0.0f && volume <= 1.0f);
- if( mCall->getSpeakerVolumeGain() >= 0)
+ if( mCall && mCall->getSpeakerVolumeGain() >= 0)
mCall->setSpeakerVolumeGain(volume);
else
CoreManager::getInstance()->getSettingsModel()->setPlaybackGain(volume);
@@ -215,7 +230,7 @@ void CallModel::setSpeakerVolumeGain (float volume) {
}
float CallModel::getMicroVolumeGain () const {
- float gain = mCall->getMicrophoneVolumeGain();
+ float gain = mCall ? mCall->getMicrophoneVolumeGain() : 0.0;
if( gain < 0)
gain = CoreManager::getInstance()->getSettingsModel()->getCaptureGain();
return gain;
@@ -223,7 +238,7 @@ float CallModel::getMicroVolumeGain () const {
void CallModel::setMicroVolumeGain (float volume) {
Q_ASSERT(volume >= 0.0f && volume <= 1.0f);
- if(mCall->getMicrophoneVolumeGain() >= 0)
+ if(mCall && mCall->getMicrophoneVolumeGain() >= 0)
mCall->setMicrophoneVolumeGain(volume);
else
CoreManager::getInstance()->getSettingsModel()->setCaptureGain(volume);
@@ -252,7 +267,8 @@ void CallModel::acceptWithVideo () {
void CallModel::terminate () {
CoreManager *core = CoreManager::getInstance();
core->lockVideoRender();
- mCall->terminate();
+ if(mCall)
+ mCall->terminate();
core->unlockVideoRender();
}
@@ -267,7 +283,7 @@ void CallModel::askForAttendedTransfer () {
}
bool CallModel::transferTo (const QString &sipAddress) {
- bool failure = !!mCall->transferTo(Utils::interpretUrl(sipAddress));
+ bool failure = mCall ? !!mCall->transferTo(Utils::interpretUrl(sipAddress)) : false;
if (failure)
qWarning() << QStringLiteral("Unable to transfer: `%1`.").arg(sipAddress);
return !failure;
@@ -280,7 +296,7 @@ bool CallModel::transferToAnother (const QString &peerAddress) {
qWarning() << QStringLiteral("Unable to transfer to another: `%1` (peer not found)").arg(peerAddress);
return false;
}
- bool failure = !!transferCallModel->mCall->transferToAnother(mCall);
+ bool failure = mCall ? !!transferCallModel->mCall->transferToAnother(mCall) : false;
if (failure)
qWarning() << QStringLiteral("Unable to transfer to another: `%1` (transfer failed)").arg(peerAddress);
return !failure;
@@ -288,17 +304,20 @@ bool CallModel::transferToAnother (const QString &peerAddress) {
// -----------------------------------------------------------------------------
void CallModel::acceptVideoRequest () {
- shared_ptr params = CoreManager::getInstance()->getCore()->createCallParams(mCall);
- params->enableVideo(true);
-
- mCall->acceptUpdate(params);
+ if(mCall) {
+ shared_ptr params = CoreManager::getInstance()->getCore()->createCallParams(mCall);
+ params->enableVideo(true);
+ mCall->acceptUpdate(params);
+ }
}
void CallModel::rejectVideoRequest () {
- shared_ptr params = CoreManager::getInstance()->getCore()->createCallParams(mCall);
- params->enableVideo(false);
+ if(mCall) {
+ shared_ptr params = CoreManager::getInstance()->getCore()->createCallParams(mCall);
+ params->enableVideo(false);
- mCall->acceptUpdate(params);
+ mCall->acceptUpdate(params);
+ }
}
void CallModel::takeSnapshot () {
@@ -314,7 +333,8 @@ void CallModel::takeSnapshot () {
qInfo() << QStringLiteral("Take snapshot of call:") << this;
const QString filePath(CoreManager::getInstance()->getSettingsModel()->getSavedScreenshotsFolder().append(newName));
- mCall->takeVideoSnapshot(Utils::appStringToCoreString(filePath));
+ if(mCall)
+ mCall->takeVideoSnapshot(Utils::appStringToCoreString(filePath));
App::getInstance()->getNotifier()->notifySnapshotWasTaken(filePath);
}
@@ -323,8 +343,8 @@ void CallModel::startRecording () {
return;
qInfo() << QStringLiteral("Start recording call:") << this;
-
- mCall->startRecording();
+ if(mCall)
+ mCall->startRecording();
mRecording = true;
emit recordingChanged(true);
@@ -337,12 +357,13 @@ void CallModel::stopRecording () {
qInfo() << QStringLiteral("Stop recording call:") << this;
mRecording = false;
- mCall->stopRecording();
+ if(mCall) {
+ mCall->stopRecording();
- App::getInstance()->getNotifier()->notifyRecordingCompleted(
+ App::getInstance()->getNotifier()->notifyRecordingCompleted(
Utils::coreStringToAppString(mCall->getParams()->getRecordFile())
);
-
+ }
emit recordingChanged(false);
}
@@ -397,7 +418,7 @@ void CallModel::handleCallStateChanged (const shared_ptr &call,
break;
case linphone::Call::State::UpdatedByRemote:
- if (!mCall->getCurrentParams()->videoEnabled() && mCall->getRemoteParams()->videoEnabled()) {
+ if (mCall && !mCall->getCurrentParams()->videoEnabled() && mCall->getRemoteParams()->videoEnabled()) {
mCall->deferUpdate();
emit videoRequested();
}
@@ -436,17 +457,19 @@ void CallModel::accept (bool withVideo) {
}
qApp->processEvents(); // Process GUI events before accepting in order to be synchronized with Call objects and be ready to get SDK events
shared_ptr core = coreManager->getCore();
- shared_ptr params = core->createCallParams(mCall);
- params->enableVideo(withVideo);
- setRecordFile(params);
+ if(mCall) {
+ shared_ptr params = core->createCallParams(mCall);
+ params->enableVideo(withVideo);
+ setRecordFile(params);
- mCall->acceptWithParams(params);
+ mCall->acceptWithParams(params);
+ }
}
// -----------------------------------------------------------------------------
void CallModel::updateIsInConference () {
- if (mIsInConference != mCall->getCurrentParams()->getLocalConferenceMode()) {
+ if (mIsInConference != (mCall && mCall->getCurrentParams()->getLocalConferenceMode() )) {
mIsInConference = !mIsInConference;
}
emit isInConferenceChanged(mIsInConference);
@@ -465,40 +488,43 @@ void CallModel::stopAutoAnswerTimer () const {
// -----------------------------------------------------------------------------
CallModel::CallStatus CallModel::getStatus () const {
- switch (mCall->getState()) {
- case linphone::Call::State::Connected:
- case linphone::Call::State::StreamsRunning:
- return CallStatusConnected;
-
- case linphone::Call::State::End:
- case linphone::Call::State::Error:
- case linphone::Call::State::Referred:
- case linphone::Call::State::Released:
- return CallStatusEnded;
-
- case linphone::Call::State::Paused:
- case linphone::Call::State::PausedByRemote:
- case linphone::Call::State::Pausing:
- case linphone::Call::State::Resuming:
- return CallStatusPaused;
-
- case linphone::Call::State::Updating:
- case linphone::Call::State::UpdatedByRemote:
- return mPausedByRemote ? CallStatusPaused : CallStatusConnected;
-
- case linphone::Call::State::EarlyUpdatedByRemote:
- case linphone::Call::State::EarlyUpdating:
- case linphone::Call::State::Idle:
- case linphone::Call::State::IncomingEarlyMedia:
- case linphone::Call::State::IncomingReceived:
- case linphone::Call::State::OutgoingEarlyMedia:
- case linphone::Call::State::OutgoingInit:
- case linphone::Call::State::OutgoingProgress:
- case linphone::Call::State::OutgoingRinging:
- break;
- }
-
- return mCall->getDir() == linphone::Call::Dir::Incoming ? CallStatusIncoming : CallStatusOutgoing;
+ if(mCall){
+ switch (mCall->getState()) {
+ case linphone::Call::State::Connected:
+ case linphone::Call::State::StreamsRunning:
+ return CallStatusConnected;
+
+ case linphone::Call::State::End:
+ case linphone::Call::State::Error:
+ case linphone::Call::State::Referred:
+ case linphone::Call::State::Released:
+ return CallStatusEnded;
+
+ case linphone::Call::State::Paused:
+ case linphone::Call::State::PausedByRemote:
+ case linphone::Call::State::Pausing:
+ case linphone::Call::State::Resuming:
+ return CallStatusPaused;
+
+ case linphone::Call::State::Updating:
+ case linphone::Call::State::UpdatedByRemote:
+ return mPausedByRemote ? CallStatusPaused : CallStatusConnected;
+
+ case linphone::Call::State::EarlyUpdatedByRemote:
+ case linphone::Call::State::EarlyUpdating:
+ case linphone::Call::State::Idle:
+ case linphone::Call::State::IncomingEarlyMedia:
+ case linphone::Call::State::IncomingReceived:
+ case linphone::Call::State::OutgoingEarlyMedia:
+ case linphone::Call::State::OutgoingInit:
+ case linphone::Call::State::OutgoingProgress:
+ case linphone::Call::State::OutgoingRinging:
+ break;
+ }
+
+ return mCall->getDir() == linphone::Call::Dir::Incoming ? CallStatusIncoming : CallStatusOutgoing;
+ }else
+ return CallStatusIdle;
}
// -----------------------------------------------------------------------------
@@ -509,7 +535,7 @@ void CallModel::acceptWithAutoAnswerDelay () {
// Use auto-answer if activated and it's the only call.
if (settingsModel->getAutoAnswerStatus() && coreManager->getCore()->getCallsNb() == 1) {
- if (mCall->getRemoteParams()->videoEnabled() && settingsModel->getAutoAnswerVideoStatus() && settingsModel->getVideoSupported())
+ if (mCall && mCall->getRemoteParams()->videoEnabled() && settingsModel->getAutoAnswerVideoStatus() && settingsModel->getVideoSupported())
acceptWithVideo();
else
accept();
@@ -549,23 +575,23 @@ void CallModel::setCallErrorFromReason (linphone::Reason reason) {
// -----------------------------------------------------------------------------
int CallModel::getDuration () const {
- return mCall->getDuration();
+ return mCall ? mCall->getDuration() : 0;
}
float CallModel::getQuality () const {
- return mCall->getCurrentQuality();
+ return mCall ? mCall->getCurrentQuality() : 0.0;
}
// -----------------------------------------------------------------------------
float CallModel::getSpeakerVu () const {
- if (mCall->getState() == linphone::Call::State::StreamsRunning)
+ if (mCall && mCall->getState() == linphone::Call::State::StreamsRunning)
return MediastreamerUtils::computeVu(mCall->getPlayVolume());
return 0.0;
}
float CallModel::getMicroVu () const {
- if (mCall->getState() == linphone::Call::State::StreamsRunning)
+ if (mCall && mCall->getState() == linphone::Call::State::StreamsRunning)
return MediastreamerUtils::computeVu(mCall->getRecordVolume());
return 0.0;
}
@@ -573,28 +599,28 @@ float CallModel::getMicroVu () const {
// -----------------------------------------------------------------------------
bool CallModel::getSpeakerMuted () const {
- return mCall->getSpeakerMuted();
+ return mCall && mCall->getSpeakerMuted();
}
void CallModel::setSpeakerMuted (bool status) {
if (status == getSpeakerMuted())
return;
-
- mCall->setSpeakerMuted(status);
+ if(mCall)
+ mCall->setSpeakerMuted(status);
emit speakerMutedChanged(getSpeakerMuted());
}
// -----------------------------------------------------------------------------
bool CallModel::getMicroMuted () const {
- return mCall->getMicrophoneMuted();
+ return mCall && mCall->getMicrophoneMuted();
}
void CallModel::setMicroMuted (bool status) {
if (status == getMicroMuted())
return;
-
- mCall->setMicrophoneMuted(status);
+ if(mCall)
+ mCall->setMicrophoneMuted(status);
emit microMutedChanged(getMicroMuted());
}
@@ -605,23 +631,25 @@ bool CallModel::getPausedByUser () const {
}
void CallModel::setPausedByUser (bool status) {
- switch (mCall->getState()) {
- case linphone::Call::State::Connected:
- case linphone::Call::State::StreamsRunning:
- case linphone::Call::State::Paused:
- case linphone::Call::State::PausedByRemote:
- break;
- default: return;
+ if(mCall){
+ switch (mCall->getState()) {
+ case linphone::Call::State::Connected:
+ case linphone::Call::State::StreamsRunning:
+ case linphone::Call::State::Paused:
+ case linphone::Call::State::PausedByRemote:
+ break;
+ default: return;
+ }
+
+ if (status) {
+ if (!mPausedByUser)
+ mCall->pause();
+ return;
+ }
+
+ if (mPausedByUser)
+ mCall->resume();
}
-
- if (status) {
- if (!mPausedByUser)
- mCall->pause();
- return;
- }
-
- if (mPausedByUser)
- mCall->resume();
}
// -----------------------------------------------------------------------------
@@ -631,8 +659,11 @@ bool CallModel::getRemoteVideoEnabled () const {
}
bool CallModel::getVideoEnabled () const {
- shared_ptr params = mCall->getCurrentParams();
- return params && params->videoEnabled() && getStatus() == CallStatusConnected;
+ if(mCall){
+ shared_ptr params = mCall->getCurrentParams();
+ return params && params->videoEnabled() && getStatus() == CallStatusConnected;
+ }else
+ return true;
}
void CallModel::setVideoEnabled (bool status) {
@@ -641,35 +672,38 @@ void CallModel::setVideoEnabled (bool status) {
qWarning() << QStringLiteral("Unable to update video call property. (Video not supported.)");
return;
}
-
- switch (mCall->getState()) {
- case linphone::Call::State::Connected:
- case linphone::Call::State::StreamsRunning:
- break;
- default: return;
+ if(mCall) {
+ switch (mCall->getState()) {
+ case linphone::Call::State::Connected:
+ case linphone::Call::State::StreamsRunning:
+ break;
+ default: return;
+ }
+
+ if (status == getVideoEnabled())
+ return;
+
+ shared_ptr params = core->createCallParams(mCall);
+ params->enableVideo(status);
+
+ mCall->update(params);
}
-
- if (status == getVideoEnabled())
- return;
-
- shared_ptr params = core->createCallParams(mCall);
- params->enableVideo(status);
-
- mCall->update(params);
}
// -----------------------------------------------------------------------------
bool CallModel::getUpdating () const {
- switch (mCall->getState()) {
- case linphone::Call::State::Connected:
- case linphone::Call::State::StreamsRunning:
- case linphone::Call::State::Paused:
- case linphone::Call::State::PausedByRemote:
- return false;
-
- default:
- break;
+ if(mCall) {
+ switch (mCall->getState()) {
+ case linphone::Call::State::Connected:
+ case linphone::Call::State::StreamsRunning:
+ case linphone::Call::State::Paused:
+ case linphone::Call::State::PausedByRemote:
+ return false;
+
+ default:
+ break;
+ }
}
return true;
@@ -684,21 +718,24 @@ bool CallModel::getRecording () const {
void CallModel::sendDtmf (const QString &dtmf) {
const char key = dtmf.constData()[0].toLatin1();
qInfo() << QStringLiteral("Send dtmf: `%1`.").arg(key);
- mCall->sendDtmf(key);
+ if(mCall)
+ mCall->sendDtmf(key);
CoreManager::getInstance()->getCore()->playDtmf(key, DtmfSoundDelay);
}
// -----------------------------------------------------------------------------
void CallModel::verifyAuthenticationToken (bool verify) {
- mCall->setAuthenticationTokenVerified(verify);
+ if(mCall)
+ mCall->setAuthenticationTokenVerified(verify);
emit securityUpdated();
}
// -----------------------------------------------------------------------------
void CallModel::updateStreams () {
- mCall->update(nullptr);
+ if(mCall)
+ mCall->update(nullptr);
}
void CallModel::toggleSpeakerMute(){
setSpeakerMuted(!getSpeakerMuted());
@@ -727,30 +764,34 @@ void CallModel::searchReceived(std::list
}
void CallModel::callEnded(){
- ChatRoomModel * model = getChatRoomModel();
-
- if(model){
- model->callEnded(mCall);
- }else{// No chat rooms have been associated for this call. Search one in current chat room list
- shared_ptr core = CoreManager::getInstance()->getCore();
- std::shared_ptr params = core->createDefaultChatRoomParams();
- std::list> participants;
+ if(mCall){
+ ChatRoomModel * model = getChatRoomModel();
- auto chatRoom = core->searchChatRoom(params, mCall->getCallLog()->getLocalAddress()
- , mCall->getRemoteAddress()
- , participants);
- std::shared_ptr chatRoomModel= CoreManager::getInstance()->getTimelineListModel()->getChatRoomModel(chatRoom, false);
- if(chatRoomModel)
- chatRoomModel->callEnded(mCall);
+ if(model){
+ model->callEnded(mCall);
+ }else{// No chat rooms have been associated for this call. Search one in current chat room list
+ shared_ptr core = CoreManager::getInstance()->getCore();
+ std::shared_ptr params = core->createDefaultChatRoomParams();
+ std::list> participants;
+
+ auto chatRoom = core->searchChatRoom(params, mCall->getCallLog()->getLocalAddress()
+ , mCall->getRemoteAddress()
+ , participants);
+ std::shared_ptr chatRoomModel= CoreManager::getInstance()->getTimelineListModel()->getChatRoomModel(chatRoom, false);
+ if(chatRoomModel)
+ chatRoomModel->callEnded(mCall);
+ }
}
}
void CallModel::setRemoteDisplayName(const std::string& name){
mRemoteAddress->setDisplayName(name);
- auto callLog = mCall->getCallLog();
- if(name!= "") {
- auto core = CoreManager::getInstance()->getCore();
- callLog->setRemoteAddress(Utils::interpretUrl(getFullPeerAddress()));
+ if(mCall) {
+ auto callLog = mCall->getCallLog();
+ if(name!= "") {
+ auto core = CoreManager::getInstance()->getCore();
+ callLog->setRemoteAddress(Utils::interpretUrl(getFullPeerAddress()));
+ }
}
emit fullPeerAddressChanged();
ChatRoomModel * model = getChatRoomModel();
@@ -780,41 +821,56 @@ std::shared_ptr CallModel::getRemoteAddress()const{
// -----------------------------------------------------------------------------
CallModel::CallEncryption CallModel::getEncryption () const {
- return static_cast(mCall->getCurrentParams()->getMediaEncryption());
+ if(mCall)
+ return static_cast(mCall->getCurrentParams()->getMediaEncryption());
+ else
+ return CallEncryptionNone;
}
bool CallModel::isSecured () const {
- shared_ptr params = mCall->getCurrentParams();
- linphone::MediaEncryption encryption = params->getMediaEncryption();
- return (
- encryption == linphone::MediaEncryption::ZRTP && mCall->getAuthenticationTokenVerified()
- ) || encryption == linphone::MediaEncryption::SRTP || encryption == linphone::MediaEncryption::DTLS;
+ if(mCall){
+ shared_ptr params = mCall->getCurrentParams();
+ linphone::MediaEncryption encryption = params->getMediaEncryption();
+ return (
+ encryption == linphone::MediaEncryption::ZRTP && mCall->getAuthenticationTokenVerified()
+ ) || encryption == linphone::MediaEncryption::SRTP || encryption == linphone::MediaEncryption::DTLS;
+ }else
+ return false;
}
+
// -----------------------------------------------------------------------------
QString CallModel::getLocalSas () const {
- QString token = Utils::coreStringToAppString(mCall->getAuthenticationToken());
- return mCall->getDir() == linphone::Call::Dir::Incoming ? token.left(2).toUpper() : token.right(2).toUpper();
+ if(mCall){
+ QString token = Utils::coreStringToAppString(mCall->getAuthenticationToken());
+ return mCall->getDir() == linphone::Call::Dir::Incoming ? token.left(2).toUpper() : token.right(2).toUpper();
+ }else
+ return "";
}
QString CallModel::getRemoteSas () const {
- QString token = Utils::coreStringToAppString(mCall->getAuthenticationToken());
- return mCall->getDir() != linphone::Call::Dir::Incoming ? token.left(2).toUpper() : token.right(2).toUpper();
+ if(mCall){
+ QString token = Utils::coreStringToAppString(mCall->getAuthenticationToken());
+ return mCall->getDir() != linphone::Call::Dir::Incoming ? token.left(2).toUpper() : token.right(2).toUpper();
+ }else
+ return "";
}
// -----------------------------------------------------------------------------
QString CallModel::getSecuredString () const {
- switch (mCall->getCurrentParams()->getMediaEncryption()) {
- case linphone::MediaEncryption::SRTP:
- return QStringLiteral("SRTP");
- case linphone::MediaEncryption::ZRTP:
- return QStringLiteral("ZRTP");
- case linphone::MediaEncryption::DTLS:
- return QStringLiteral("DTLS");
- case linphone::MediaEncryption::None:
- break;
+ if(mCall){
+ switch (mCall->getCurrentParams()->getMediaEncryption()) {
+ case linphone::MediaEncryption::SRTP:
+ return QStringLiteral("SRTP");
+ case linphone::MediaEncryption::ZRTP:
+ return QStringLiteral("ZRTP");
+ case linphone::MediaEncryption::DTLS:
+ return QStringLiteral("DTLS");
+ case linphone::MediaEncryption::None:
+ break;
+ }
}
return QString("");
@@ -840,75 +896,77 @@ static inline QVariantMap createStat (const QString &key, const QString &value)
}
void CallModel::updateStats (const shared_ptr &callStats, QVariantList &statsList) {
- shared_ptr params = mCall->getCurrentParams();
- shared_ptr payloadType;
-
- switch (callStats->getType()) {
- case linphone::StreamType::Audio:
- payloadType = params->getUsedAudioPayloadType();
- break;
- case linphone::StreamType::Video:
- payloadType = params->getUsedVideoPayloadType();
- break;
- default:
- return;
- }
-
- QString family;
- switch (callStats->getIpFamilyOfRemote()) {
- case linphone::AddressFamily::Inet:
- family = QStringLiteral("IPv4");
- break;
- case linphone::AddressFamily::Inet6:
- family = QStringLiteral("IPv6");
- break;
- default:
- family = QStringLiteral("Unknown");
- break;
- }
-
- statsList.clear();
-
- statsList << createStat(tr("callStatsCodec"), payloadType
- ? QStringLiteral("%1 / %2kHz").arg(Utils::coreStringToAppString(payloadType->getMimeType())).arg(payloadType->getClockRate() / 1000)
- : QString(""));
- statsList << createStat(tr("callStatsUploadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getUploadBandwidth())));
- statsList << createStat(tr("callStatsDownloadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getDownloadBandwidth())));
- statsList << createStat(tr("callStatsIceState"), iceStateToString(callStats->getIceState()));
- statsList << createStat(tr("callStatsIpFamily"), family);
- statsList << createStat(tr("callStatsSenderLossRate"), QStringLiteral("%1 %").arg(static_cast(callStats->getSenderLossRate())));
- statsList << createStat(tr("callStatsReceiverLossRate"), QStringLiteral("%1 %").arg(static_cast(callStats->getReceiverLossRate())));
-
- switch (callStats->getType()) {
- case linphone::StreamType::Audio:
- statsList << createStat(tr("callStatsJitterBuffer"), QStringLiteral("%1 ms").arg(callStats->getJitterBufferSizeMs()));
- break;
- case linphone::StreamType::Video: {
- statsList << createStat(tr("callStatsEstimatedDownloadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getEstimatedDownloadBandwidth())));
- const QString sentVideoDefinitionName = Utils::coreStringToAppString(params->getSentVideoDefinition()->getName());
- const QString sentVideoDefinition = QStringLiteral("%1x%2")
- .arg(params->getSentVideoDefinition()->getWidth())
- .arg(params->getSentVideoDefinition()->getHeight());
-
- statsList << createStat(tr("callStatsSentVideoDefinition"), sentVideoDefinition == sentVideoDefinitionName
- ? sentVideoDefinition
- : QStringLiteral("%1 (%2)").arg(sentVideoDefinition).arg(sentVideoDefinitionName));
-
- const QString receivedVideoDefinitionName = Utils::coreStringToAppString(params->getReceivedVideoDefinition()->getName());
- const QString receivedVideoDefinition = QString("%1x%2")
- .arg(params->getReceivedVideoDefinition()->getWidth())
- .arg(params->getReceivedVideoDefinition()->getHeight());
-
- statsList << createStat(tr("callStatsReceivedVideoDefinition"), receivedVideoDefinition == receivedVideoDefinitionName
- ? receivedVideoDefinition
- : QString("%1 (%2)").arg(receivedVideoDefinition).arg(receivedVideoDefinitionName));
-
- statsList << createStat(tr("callStatsReceivedFramerate"), QStringLiteral("%1 FPS").arg(static_cast(params->getReceivedFramerate())));
- statsList << createStat(tr("callStatsSentFramerate"), QStringLiteral("%1 FPS").arg(static_cast(params->getSentFramerate())));
- } break;
-
- default:
- break;
+ if(mCall){
+ shared_ptr params = mCall->getCurrentParams();
+ shared_ptr payloadType;
+
+ switch (callStats->getType()) {
+ case linphone::StreamType::Audio:
+ payloadType = params->getUsedAudioPayloadType();
+ break;
+ case linphone::StreamType::Video:
+ payloadType = params->getUsedVideoPayloadType();
+ break;
+ default:
+ return;
+ }
+
+ QString family;
+ switch (callStats->getIpFamilyOfRemote()) {
+ case linphone::AddressFamily::Inet:
+ family = QStringLiteral("IPv4");
+ break;
+ case linphone::AddressFamily::Inet6:
+ family = QStringLiteral("IPv6");
+ break;
+ default:
+ family = QStringLiteral("Unknown");
+ break;
+ }
+
+ statsList.clear();
+
+ statsList << createStat(tr("callStatsCodec"), payloadType
+ ? QStringLiteral("%1 / %2kHz").arg(Utils::coreStringToAppString(payloadType->getMimeType())).arg(payloadType->getClockRate() / 1000)
+ : QString(""));
+ statsList << createStat(tr("callStatsUploadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getUploadBandwidth())));
+ statsList << createStat(tr("callStatsDownloadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getDownloadBandwidth())));
+ statsList << createStat(tr("callStatsIceState"), iceStateToString(callStats->getIceState()));
+ statsList << createStat(tr("callStatsIpFamily"), family);
+ statsList << createStat(tr("callStatsSenderLossRate"), QStringLiteral("%1 %").arg(static_cast(callStats->getSenderLossRate())));
+ statsList << createStat(tr("callStatsReceiverLossRate"), QStringLiteral("%1 %").arg(static_cast(callStats->getReceiverLossRate())));
+
+ switch (callStats->getType()) {
+ case linphone::StreamType::Audio:
+ statsList << createStat(tr("callStatsJitterBuffer"), QStringLiteral("%1 ms").arg(callStats->getJitterBufferSizeMs()));
+ break;
+ case linphone::StreamType::Video: {
+ statsList << createStat(tr("callStatsEstimatedDownloadBandwidth"), QStringLiteral("%1 kbits/s").arg(int(callStats->getEstimatedDownloadBandwidth())));
+ const QString sentVideoDefinitionName = Utils::coreStringToAppString(params->getSentVideoDefinition()->getName());
+ const QString sentVideoDefinition = QStringLiteral("%1x%2")
+ .arg(params->getSentVideoDefinition()->getWidth())
+ .arg(params->getSentVideoDefinition()->getHeight());
+
+ statsList << createStat(tr("callStatsSentVideoDefinition"), sentVideoDefinition == sentVideoDefinitionName
+ ? sentVideoDefinition
+ : QStringLiteral("%1 (%2)").arg(sentVideoDefinition).arg(sentVideoDefinitionName));
+
+ const QString receivedVideoDefinitionName = Utils::coreStringToAppString(params->getReceivedVideoDefinition()->getName());
+ const QString receivedVideoDefinition = QString("%1x%2")
+ .arg(params->getReceivedVideoDefinition()->getWidth())
+ .arg(params->getReceivedVideoDefinition()->getHeight());
+
+ statsList << createStat(tr("callStatsReceivedVideoDefinition"), receivedVideoDefinition == receivedVideoDefinitionName
+ ? receivedVideoDefinition
+ : QString("%1 (%2)").arg(receivedVideoDefinition).arg(receivedVideoDefinitionName));
+
+ statsList << createStat(tr("callStatsReceivedFramerate"), QStringLiteral("%1 FPS").arg(static_cast(params->getReceivedFramerate())));
+ statsList << createStat(tr("callStatsSentFramerate"), QStringLiteral("%1 FPS").arg(static_cast(params->getSentFramerate())));
+ } break;
+
+ default:
+ break;
+ }
}
}
diff --git a/linphone-app/src/components/call/CallModel.hpp b/linphone-app/src/components/call/CallModel.hpp
index ad14da3be..791b7bd88 100644
--- a/linphone-app/src/components/call/CallModel.hpp
+++ b/linphone-app/src/components/call/CallModel.hpp
@@ -26,54 +26,56 @@
#include "../search/SearchHandler.hpp"
// =============================================================================
+class ConferenceModel;
class ContactModel;
class ChatRoomModel;
class CallModel : public QObject {
- Q_OBJECT;
+ Q_OBJECT
- Q_PROPERTY(QString peerAddress READ getPeerAddress CONSTANT);
- Q_PROPERTY(QString localAddress READ getLocalAddress CONSTANT);
- Q_PROPERTY(QString fullPeerAddress READ getFullPeerAddress NOTIFY fullPeerAddressChanged);
- Q_PROPERTY(QString fullLocalAddress READ getFullLocalAddress CONSTANT);
+ Q_PROPERTY(QString peerAddress READ getPeerAddress CONSTANT)
+ Q_PROPERTY(QString localAddress READ getLocalAddress CONSTANT)
+ Q_PROPERTY(QString fullPeerAddress READ getFullPeerAddress NOTIFY fullPeerAddressChanged)
+ Q_PROPERTY(QString fullLocalAddress READ getFullLocalAddress CONSTANT)
Q_PROPERTY(ContactModel *contactModel READ getContactModel CONSTANT )
Q_PROPERTY(ChatRoomModel * chatRoomModel READ getChatRoomModel CONSTANT)
- Q_PROPERTY(CallStatus status READ getStatus NOTIFY statusChanged);
- Q_PROPERTY(QString callError READ getCallError NOTIFY callErrorChanged);
+ Q_PROPERTY(CallStatus status READ getStatus NOTIFY statusChanged)
+ Q_PROPERTY(QString callError READ getCallError NOTIFY callErrorChanged)
- Q_PROPERTY(bool isOutgoing READ isOutgoing CONSTANT);
+ Q_PROPERTY(bool isOutgoing READ isOutgoing CONSTANT)
- Q_PROPERTY(bool isInConference READ isInConference NOTIFY isInConferenceChanged);
+ Q_PROPERTY(bool isInConference READ isInConference NOTIFY isInConferenceChanged)
+ Q_PROPERTY(bool isConference READ isConference CONSTANT)
- Q_PROPERTY(int duration READ getDuration CONSTANT); // Constants but called with a timer in qml.
- Q_PROPERTY(float quality READ getQuality CONSTANT);
- Q_PROPERTY(float speakerVu READ getSpeakerVu CONSTANT);
- Q_PROPERTY(float microVu READ getMicroVu CONSTANT);
+ Q_PROPERTY(int duration READ getDuration CONSTANT) // Constants but called with a timer in qml.
+ Q_PROPERTY(float quality READ getQuality CONSTANT)
+ Q_PROPERTY(float speakerVu READ getSpeakerVu CONSTANT)
+ Q_PROPERTY(float microVu READ getMicroVu CONSTANT)
- Q_PROPERTY(bool speakerMuted READ getSpeakerMuted WRITE setSpeakerMuted NOTIFY speakerMutedChanged);
- Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged);
+ Q_PROPERTY(bool speakerMuted READ getSpeakerMuted WRITE setSpeakerMuted NOTIFY speakerMutedChanged)
+ Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged)
- Q_PROPERTY(float speakerVolumeGain READ getSpeakerVolumeGain WRITE setSpeakerVolumeGain NOTIFY speakerVolumeGainChanged);
- Q_PROPERTY(float microVolumeGain READ getMicroVolumeGain WRITE setMicroVolumeGain NOTIFY microVolumeGainChanged);
+ Q_PROPERTY(float speakerVolumeGain READ getSpeakerVolumeGain WRITE setSpeakerVolumeGain NOTIFY speakerVolumeGainChanged)
+ Q_PROPERTY(float microVolumeGain READ getMicroVolumeGain WRITE setMicroVolumeGain NOTIFY microVolumeGainChanged)
- Q_PROPERTY(bool pausedByUser READ getPausedByUser WRITE setPausedByUser NOTIFY statusChanged);
- Q_PROPERTY(bool videoEnabled READ getVideoEnabled WRITE setVideoEnabled NOTIFY statusChanged);
+ Q_PROPERTY(bool pausedByUser READ getPausedByUser WRITE setPausedByUser NOTIFY statusChanged)
+ Q_PROPERTY(bool videoEnabled READ getVideoEnabled WRITE setVideoEnabled NOTIFY statusChanged)
Q_PROPERTY(bool updating READ getUpdating NOTIFY statusChanged)
- Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged);
+ Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged)
- Q_PROPERTY(QVariantList audioStats READ getAudioStats NOTIFY statsUpdated);
- Q_PROPERTY(QVariantList videoStats READ getVideoStats NOTIFY statsUpdated);
+ Q_PROPERTY(QVariantList audioStats READ getAudioStats NOTIFY statsUpdated)
+ Q_PROPERTY(QVariantList videoStats READ getVideoStats NOTIFY statsUpdated)
- Q_PROPERTY(CallEncryption encryption READ getEncryption NOTIFY securityUpdated);
- Q_PROPERTY(bool isSecured READ isSecured NOTIFY securityUpdated);
- Q_PROPERTY(QString localSas READ getLocalSas NOTIFY securityUpdated);
- Q_PROPERTY(QString remoteSas READ getRemoteSas NOTIFY securityUpdated);
- Q_PROPERTY(QString securedString READ getSecuredString NOTIFY securityUpdated);
+ Q_PROPERTY(CallEncryption encryption READ getEncryption NOTIFY securityUpdated)
+ Q_PROPERTY(bool isSecured READ isSecured NOTIFY securityUpdated)
+ Q_PROPERTY(QString localSas READ getLocalSas NOTIFY securityUpdated)
+ Q_PROPERTY(QString remoteSas READ getRemoteSas NOTIFY securityUpdated)
+ Q_PROPERTY(QString securedString READ getSecuredString NOTIFY securityUpdated)
- Q_PROPERTY(QString transferAddress READ getTransferAddress WRITE setTransferAddress NOTIFY transferAddressChanged);
+ Q_PROPERTY(QString transferAddress READ getTransferAddress WRITE setTransferAddress NOTIFY transferAddressChanged)
@@ -109,12 +111,13 @@ public:
QString getFullLocalAddress () const;
ContactModel *getContactModel() const;
-
ChatRoomModel * getChatRoomModel() const;
+ std::shared_ptr getConferenceModel() const;
bool isInConference () const {
return mIsInConference;
}
+ bool isConference () const;
void setRecordFile (const std::shared_ptr &callParams);
static void setRecordFile (const std::shared_ptr &callParams, const QString &to);
@@ -197,7 +200,7 @@ private:
CallStatus getStatus () const;
bool isOutgoing () const {
- return mCall->getDir() == linphone::Call::Dir::Outgoing;
+ return mCall && mCall->getDir() == linphone::Call::Dir::Outgoing;
}
void updateIsInConference ();
@@ -268,6 +271,7 @@ private:
QVariantList mVideoStats;
std::shared_ptr mSearch;
QString mTransferAddress;
+ std::shared_ptr mConferenceModel;
};
#endif // CALL_MODEL_H_
diff --git a/linphone-app/src/components/calls/CallsListModel.cpp b/linphone-app/src/components/calls/CallsListModel.cpp
index b7fe3b51c..1d21cce80 100644
--- a/linphone-app/src/components/calls/CallsListModel.cpp
+++ b/linphone-app/src/components/calls/CallsListModel.cpp
@@ -26,6 +26,8 @@
#include "components/call/CallModel.hpp"
#include "components/conference/ConferenceAddModel.hpp"
#include "components/conference/ConferenceHelperModel.hpp"
+#include "components/conference/ConferenceModel.hpp"
+#include "components/conferenceInfo/ConferenceInfoModel.hpp"
#include "components/core/CoreHandlers.hpp"
#include "components/core/CoreManager.hpp"
#include "components/participant/ParticipantModel.hpp"
@@ -188,8 +190,8 @@ void CallsListModel::launchSecureAudioCall (const QString &sipAddress, LinphoneE
CallModel::prepareTransfert(core->inviteAddressWithParams(address, params), prepareTransfertAddress);
}
-void CallsListModel::launchVideoCall (const QString &sipAddress, const QString& prepareTransfertAddress) const {
- CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = true;
+void CallsListModel::launchVideoCall (const QString &sipAddress, const QString& prepareTransfertAddress, const bool& autoSelectAfterCreation) const {
+ CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = autoSelectAfterCreation;
shared_ptr core = CoreManager::getInstance()->getCore();
if (!core->videoSupported()) {
qWarning() << QStringLiteral("Unable to launch video call. (Video not supported.) Launching audio call...");
@@ -378,6 +380,78 @@ QVariantMap CallsListModel::createChatRoom(const QString& subject, const int& se
return result;
}
+QVariantMap CallsListModel::createConference(ConferenceInfoModel * conferenceInfo, const int& securityLevel, const int& inviteMode, const bool& selectAfterCreation) {
+ QVariantMap result;
+ CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = selectAfterCreation;
+ shared_ptr core = CoreManager::getInstance()->getCore();
+ std::shared_ptr conference;
+ QList< std::shared_ptr> admins;
+ std::shared_ptr timeline;
+ auto timelineList = CoreManager::getInstance()->getTimelineListModel();
+ qInfo() << "Conference creation of " << conferenceInfo->getSubject() << " at " << securityLevel << " security";// and with " << conferenceInfo->getConferenceInfo()->getParticipants().size();
+
+ std::shared_ptr params = core->createConferenceParams();
+ std::list > participants = conferenceInfo->getConferenceInfo()->getParticipants();
+ std::shared_ptr localAddress;
+
+ /*
+ for(auto p : participants){
+ ParticipantModel* participant = p.value();
+ std::shared_ptr address;
+ if(participant) {
+ address = Utils::interpretUrl(participant->getSipAddress());
+ if(participant->getAdminStatus())
+ admins << address;
+ }else{
+ QString participant = p.toString();
+ if( participant != "")
+ address = Utils::interpretUrl(participant);
+ }
+ if( address)
+ chatRoomParticipants.push_back( address );
+ }*/
+ auto proxy = core->getDefaultProxyConfig();
+ params->setVideoEnabled(true);
+ params->setStartTime(conferenceInfo->getConferenceInfo()->getDateTime());
+ params->setEndTime(conferenceInfo->getConferenceInfo()->getDateTime()+conferenceInfo->getConferenceInfo()->getDuration()*60*1000);
+ //params->setDescription(conferenceInfo->getConferenceInfo()->getDescription());
+
+ //params->enableEncryption(securityLevel>0);
+
+// if( securityLevel>0){
+// params->enableEncryption(true);
+// }else
+// params->setBackend(linphone::ChatRoomBackend::Basic);
+// params->enableGroup( subject!="" );
+
+
+ if(participants.size() > 0) {
+ params->setSubject(conferenceInfo->getSubject() != ""?Utils::appStringToCoreString(conferenceInfo->getSubject()):"Dummy Subject");
+ if( !conference) {
+ core->createConferenceOnServer(params, localAddress, participants);
+ /*
+ //conference = core->createConferenceWithParams(params);
+ if(conference != nullptr && admins.size() > 0){
+ for(auto a : admins) {
+ auto p = conference->findParticipant(a);
+ if( p )
+ conference->setParticipantAdminStatus(p, true);
+ else
+ qWarning() <<"Cannot set admin for " << a->asString().c_str() << ". It is not found in conference.";
+ }
+ }
+ // Warning: Should not be needed but SDK doesn't ref it
+ mConferences.append(std::make_shared(conference));
+ //ChatRoomInitializer::setAdminsAsync(params->getSubject(), params->getBackend(), params->groupEnabled(), admins );
+ // timeline = timelineList->getTimeline(conference, false);
+ */
+ }
+
+ }
+ //result["created"] = (conference != nullptr);
+ return result;
+}
+
// -----------------------------------------------------------------------------
@@ -523,6 +597,31 @@ void CallsListModel::addCall (const shared_ptr &call) {
emit layoutChanged();
}
+
+void CallsListModel::addDummyCall () {
+ QQuickWindow *callsWindow = App::getInstance()->getCallsWindow();
+ if (callsWindow) {
+ App::smartShowWindow(callsWindow);
+ }
+
+ CallModel *callModel = new CallModel(nullptr);
+ qInfo() << QStringLiteral("Add call:") << callModel->getFullLocalAddress() << callModel->getFullPeerAddress();
+ App::getInstance()->getEngine()->setObjectOwnership(callModel, QQmlEngine::CppOwnership);
+
+ // This connection is (only) useful for `CallsListProxyModel`.
+ QObject::connect(callModel, &CallModel::isInConferenceChanged, this, [this, callModel](bool) {
+ int id = findCallIndex(mList, *callModel);
+ emit dataChanged(index(id, 0), index(id, 0));
+ });
+
+ int row = mList.count();
+
+ beginInsertRows(QModelIndex(), row, row);
+ mList << callModel;
+ endInsertRows();
+ emit layoutChanged();
+}
+
void CallsListModel::removeCall (const shared_ptr &call) {
CallModel *callModel;
diff --git a/linphone-app/src/components/calls/CallsListModel.hpp b/linphone-app/src/components/calls/CallsListModel.hpp
index 0d473c5cc..1ca7aa800 100644
--- a/linphone-app/src/components/calls/CallsListModel.hpp
+++ b/linphone-app/src/components/calls/CallsListModel.hpp
@@ -31,6 +31,8 @@
class ChatRoomModel;
class CoreHandlers;
+class ConferenceModel;
+class ConferenceInfoModel;
class CallsListModel : public QAbstractListModel {
Q_OBJECT
@@ -49,7 +51,7 @@ public:
Q_INVOKABLE void launchAudioCall (const QString &sipAddress, const QString& prepareTransfertAddress = "", const QHash &headers = {}) const;
Q_INVOKABLE void launchSecureAudioCall (const QString &sipAddress, LinphoneEnums::MediaEncryption encryption, const QHash &headers = {}, const QString& prepareTransfertAddress = "") const;
- Q_INVOKABLE void launchVideoCall (const QString &sipAddress, const QString& prepareTransfertAddress = "") const;
+ Q_INVOKABLE void launchVideoCall (const QString &sipAddress, const QString& prepareTransfertAddress = "", const bool& autoSelectAfterCreation = true) const;
Q_INVOKABLE ChatRoomModel* launchSecureChat (const QString &sipAddress) const;
Q_INVOKABLE QVariantMap launchChat(const QString &sipAddress, const int& securityLevel) const;
Q_INVOKABLE ChatRoomModel* createChat (const QString &participantAddress) const;
@@ -58,6 +60,9 @@ public:
QVariantMap createChatRoom(const QString& subject, const int& securityLevel, std::shared_ptr localAddress, const QVariantList& participants, const bool& selectAfterCreation) const;
Q_INVOKABLE QVariantMap createChatRoom(const QString& subject, const int& securityLevel, const QVariantList& participants, const bool& selectAfterCreation) const;
+ //Q_INVOKABLE QVariantMap createConference(const QString& subject, const int& securityLevel, const QVariantList& participants, const int& inviteMode, const bool& selectAfterCreation);
+ Q_INVOKABLE QVariantMap createConference(ConferenceInfoModel * conferenceInfo, const int& securityLevel, const int& inviteMode, const bool& selectAfterCreation);
+
Q_INVOKABLE int getRunningCallsNumber () const;
@@ -80,10 +85,12 @@ private:
void handleCallStateChanged (const std::shared_ptr &call, linphone::Call::State state);
void addCall (const std::shared_ptr &call);
+ void addDummyCall ();
void removeCall (const std::shared_ptr &call);
void removeCallCb (CallModel *callModel);
QList mList;
+ QList> mConferences;
std::shared_ptr mCoreHandlers;
};
diff --git a/linphone-app/src/components/conference/ConferenceModel.cpp b/linphone-app/src/components/conference/ConferenceModel.cpp
index dff2d0d7f..c7b993d5d 100644
--- a/linphone-app/src/components/conference/ConferenceModel.cpp
+++ b/linphone-app/src/components/conference/ConferenceModel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 Belledonne Communications SARL.
+ * Copyright (c) 2021 Belledonne Communications SARL.
*
* This file is part of linphone-desktop
* (see https://www.linphone.org).
@@ -18,131 +18,30 @@
* along with this program. If not, see .
*/
-#include
-#include
+#include "ConferenceModel.hpp"
+
+#include
+#include
+#include
+#include
#include "app/App.hpp"
-#include "components/call/CallModel.hpp"
-#include "components/calls/CallsListModel.hpp"
-#include "components/core/CoreHandlers.hpp"
-#include "components/core/CoreManager.hpp"
-#include "components/notifier/Notifier.hpp"
-#include "components/settings/SettingsModel.hpp"
-#include "utils/MediastreamerUtils.hpp"
-#include "utils/Utils.hpp"
+#include "app/paths/Paths.hpp"
+#include "app/providers/ThumbnailProvider.hpp"
-#include "ConferenceModel.hpp"
+
+#include "utils/QExifImageHeader.hpp"
+#include "utils/Utils.hpp"
+#include "utils/Constants.hpp"
+#include "components/Components.hpp"
// =============================================================================
-using namespace std;
-
-ConferenceModel::ConferenceModel (QObject *parent) : QSortFilterProxyModel(parent) {
- QObject::connect(this, &ConferenceModel::rowsRemoved, [this] { // Warning : called before model remove its items
- emit countChanged(rowCount());
- });
- QObject::connect(this, &ConferenceModel::rowsInserted, [this] {
- emit countChanged(rowCount());
- });
- setSourceModel(CoreManager::getInstance()->getCallsListModel());
- emit conferenceChanged();
-
- QObject::connect(
- CoreManager::getInstance()->getHandlers().get(), &CoreHandlers::callStateChanged,
- this, [this] { emit conferenceChanged(); });
-}
-// Show all paraticpants thar should be, will be or are still in conference
-bool ConferenceModel::filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const {
- const QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
- const CallModel *callModel = index.data().value();
- return callModel->getCall()->getParams()->getLocalConferenceMode() || callModel->getCall()->getCurrentParams()->getLocalConferenceMode();
-}
-// -----------------------------------------------------------------------------
-
-void ConferenceModel::terminate () {
- shared_ptr core = CoreManager::getInstance()->getCore();
- core->terminateConference();
-
- for (const auto &call : core->getCalls()) {
- if (call->getParams()->getLocalConferenceMode())// Terminate all call where participants are or will be in conference
- call->terminate();
- }
+ConferenceModel::ConferenceModel(std::shared_ptr conference){
+ App::getInstance()->getEngine()->setObjectOwnership(this, QQmlEngine::CppOwnership);// Avoid QML to destroy it when passing by Q_INVOKABLE
+ mConference = conference;
}
-// -----------------------------------------------------------------------------
-
-void ConferenceModel::startRecording () {
- if (mRecording)
- return;
-
- qInfo() << QStringLiteral("Start recording conference:") << this;
-
- CoreManager *coreManager = CoreManager::getInstance();
- mLastRecordFile =
- QStringLiteral("%1%2.mkv")
- .arg(coreManager->getSettingsModel()->getSavedCallsFolder())
- .arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss"));
- coreManager->getCore()->startConferenceRecording(Utils::appStringToCoreString(mLastRecordFile) );
- mRecording = true;
-
- emit recordingChanged(true);
-}
-
-void ConferenceModel::stopRecording () {
- if (!mRecording)
- return;
-
- qInfo() << QStringLiteral("Stop recording conference:") << this;
-
- mRecording = false;
-
- CoreManager::getInstance()->getCore()->stopConferenceRecording();
- App::getInstance()->getNotifier()->notifyRecordingCompleted(mLastRecordFile);
-
- emit recordingChanged(false);
-}
-
-// -----------------------------------------------------------------------------
-
-bool ConferenceModel::getMicroMuted () const {
- return !CoreManager::getInstance()->getCore()->micEnabled();
-}
-
-void ConferenceModel::setMicroMuted (bool status) {
- shared_ptr core = CoreManager::getInstance()->getCore();
-
- if (status == core->micEnabled()) {
- core->enableMic(!status);
- emit microMutedChanged(status);
- }
-}
-
-// -----------------------------------------------------------------------------
-
-bool ConferenceModel::getRecording () const {
- return mRecording;
-}
-
-// -----------------------------------------------------------------------------
-
-float ConferenceModel::getMicroVu () const {
- return MediastreamerUtils::computeVu(
- CoreManager::getInstance()->getCore()->getConferenceLocalInputVolume()
- );
-}
-
-// -----------------------------------------------------------------------------
-
-void ConferenceModel::leave () {
- CoreManager::getInstance()->getCore()->leaveConference();
- emit conferenceChanged();
-}
-
-void ConferenceModel::join () {
- CoreManager::getInstance()->getCore()->enterConference();
- emit conferenceChanged();
-}
-
-bool ConferenceModel::isInConference () const {
- return CoreManager::getInstance()->getCore()->isInConference();
+std::shared_ptr ConferenceModel::getConference()const{
+ return mConference;
}
diff --git a/linphone-app/src/components/conference/ConferenceModel.hpp b/linphone-app/src/components/conference/ConferenceModel.hpp
index 67096cec4..add828892 100644
--- a/linphone-app/src/components/conference/ConferenceModel.hpp
+++ b/linphone-app/src/components/conference/ConferenceModel.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 Belledonne Communications SARL.
+ * Copyright (c) 2021 Belledonne Communications SARL.
*
* This file is part of linphone-desktop
* (see https://www.linphone.org).
@@ -21,59 +21,24 @@
#ifndef CONFERENCE_MODEL_H_
#define CONFERENCE_MODEL_H_
-#include
+#include
// =============================================================================
+#include
+#include
+#include
-class CallModel;
-
-class ConferenceModel : public QSortFilterProxyModel {
- Q_OBJECT;
-
- Q_PROPERTY(int count READ getCount NOTIFY countChanged);
-
- Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged);
- Q_PROPERTY(float microVu READ getMicroVu CONSTANT);
-
- Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged);
- Q_PROPERTY(bool isInConf READ isInConference NOTIFY conferenceChanged);
-
+class ConferenceModel : public QObject{
+ Q_OBJECT
public:
- ConferenceModel (QObject *parent = Q_NULLPTR);
+ ConferenceModel(std::shared_ptr content);
-protected:
- bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override;
- Q_INVOKABLE void terminate ();
-
- Q_INVOKABLE void startRecording ();
- Q_INVOKABLE void stopRecording ();
-
- Q_INVOKABLE void join ();
- Q_INVOKABLE void leave ();
-
-signals:
- void countChanged (int count);
-
- void microMutedChanged (bool status);
- void recordingChanged (bool status);
- void conferenceChanged ();
+ std::shared_ptr getConference()const;
private:
- int getCount () const {
- return rowCount();
- }
-
- bool getMicroMuted () const;
- void setMicroMuted (bool status);
- float getMicroVu () const;
-
- bool isInConference () const;
-
- bool getRecording () const;
-
- bool mRecording = false;
- QString mLastRecordFile;
+ std::shared_ptr mConference;
};
+Q_DECLARE_METATYPE(std::shared_ptr)
-#endif // CONFERENCE_MODEL_H_
+#endif
diff --git a/linphone-app/src/components/conference/ConferenceProxyModel.cpp b/linphone-app/src/components/conference/ConferenceProxyModel.cpp
new file mode 100644
index 000000000..7448ea665
--- /dev/null
+++ b/linphone-app/src/components/conference/ConferenceProxyModel.cpp
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2010-2020 Belledonne Communications SARL.
+ *
+ * This file is part of linphone-desktop
+ * (see https://www.linphone.org).
+ *
+ * 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 .
+ */
+
+#include
+#include
+
+#include "app/App.hpp"
+#include "components/call/CallModel.hpp"
+#include "components/calls/CallsListModel.hpp"
+#include "components/core/CoreHandlers.hpp"
+#include "components/core/CoreManager.hpp"
+#include "components/notifier/Notifier.hpp"
+#include "components/settings/SettingsModel.hpp"
+#include "utils/MediastreamerUtils.hpp"
+#include "utils/Utils.hpp"
+
+#include "ConferenceProxyModel.hpp"
+
+// =============================================================================
+
+using namespace std;
+
+ConferenceProxyModel::ConferenceProxyModel (QObject *parent) : QSortFilterProxyModel(parent) {
+ QObject::connect(this, &ConferenceProxyModel::rowsRemoved, [this] { // Warning : called before model remove its items
+ emit countChanged(rowCount());
+ });
+ QObject::connect(this, &ConferenceProxyModel::rowsInserted, [this] {
+ emit countChanged(rowCount());
+ });
+ setSourceModel(CoreManager::getInstance()->getCallsListModel());
+ emit conferenceChanged();
+
+ QObject::connect(
+ CoreManager::getInstance()->getHandlers().get(), &CoreHandlers::callStateChanged,
+ this, [this] { emit conferenceChanged(); });
+}
+// Show all paraticpants thar should be, will be or are still in conference
+bool ConferenceProxyModel::filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const {
+ const QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
+ const CallModel *callModel = index.data().value();
+ return callModel->getCall()->getParams()->getLocalConferenceMode() || callModel->getCall()->getCurrentParams()->getLocalConferenceMode();
+}
+// -----------------------------------------------------------------------------
+
+void ConferenceProxyModel::terminate () {
+ shared_ptr core = CoreManager::getInstance()->getCore();
+ core->terminateConference();
+
+ for (const auto &call : core->getCalls()) {
+ if (call->getParams()->getLocalConferenceMode())// Terminate all call where participants are or will be in conference
+ call->terminate();
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void ConferenceProxyModel::startRecording () {
+ if (mRecording)
+ return;
+
+ qInfo() << QStringLiteral("Start recording conference:") << this;
+
+ CoreManager *coreManager = CoreManager::getInstance();
+ mLastRecordFile =
+ QStringLiteral("%1%2.mkv")
+ .arg(coreManager->getSettingsModel()->getSavedCallsFolder())
+ .arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss"));
+ coreManager->getCore()->startConferenceRecording(Utils::appStringToCoreString(mLastRecordFile) );
+ mRecording = true;
+
+ emit recordingChanged(true);
+}
+
+void ConferenceProxyModel::stopRecording () {
+ if (!mRecording)
+ return;
+
+ qInfo() << QStringLiteral("Stop recording conference:") << this;
+
+ mRecording = false;
+
+ CoreManager::getInstance()->getCore()->stopConferenceRecording();
+ App::getInstance()->getNotifier()->notifyRecordingCompleted(mLastRecordFile);
+
+ emit recordingChanged(false);
+}
+
+// -----------------------------------------------------------------------------
+
+bool ConferenceProxyModel::getMicroMuted () const {
+ return !CoreManager::getInstance()->getCore()->micEnabled();
+}
+
+void ConferenceProxyModel::setMicroMuted (bool status) {
+ shared_ptr core = CoreManager::getInstance()->getCore();
+
+ if (status == core->micEnabled()) {
+ core->enableMic(!status);
+ emit microMutedChanged(status);
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+bool ConferenceProxyModel::getRecording () const {
+ return mRecording;
+}
+
+// -----------------------------------------------------------------------------
+
+float ConferenceProxyModel::getMicroVu () const {
+ return MediastreamerUtils::computeVu(
+ CoreManager::getInstance()->getCore()->getConferenceLocalInputVolume()
+ );
+}
+
+// -----------------------------------------------------------------------------
+
+void ConferenceProxyModel::leave () {
+ CoreManager::getInstance()->getCore()->leaveConference();
+ emit conferenceChanged();
+}
+
+void ConferenceProxyModel::join () {
+ CoreManager::getInstance()->getCore()->enterConference();
+ emit conferenceChanged();
+}
+
+bool ConferenceProxyModel::isInConference () const {
+ return CoreManager::getInstance()->getCore()->isInConference();
+}
diff --git a/linphone-app/src/components/conference/ConferenceProxyModel.hpp b/linphone-app/src/components/conference/ConferenceProxyModel.hpp
new file mode 100644
index 000000000..e1eb18308
--- /dev/null
+++ b/linphone-app/src/components/conference/ConferenceProxyModel.hpp
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2010-2020 Belledonne Communications SARL.
+ *
+ * This file is part of linphone-desktop
+ * (see https://www.linphone.org).
+ *
+ * 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 .
+ */
+
+#ifndef CONFERENCE_PROXY_MODEL_H_
+#define CONFERENCE_PROXY_MODEL_H_
+
+#include
+
+// =============================================================================
+
+class CallModel;
+
+class ConferenceProxyModel : public QSortFilterProxyModel {
+ Q_OBJECT;
+
+ Q_PROPERTY(int count READ getCount NOTIFY countChanged);
+
+ Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged);
+ Q_PROPERTY(float microVu READ getMicroVu CONSTANT);
+
+ Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged);
+ Q_PROPERTY(bool isInConf READ isInConference NOTIFY conferenceChanged);
+
+public:
+ ConferenceProxyModel (QObject *parent = Q_NULLPTR);
+
+protected:
+ bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override;
+
+ Q_INVOKABLE void terminate ();
+
+ Q_INVOKABLE void startRecording ();
+ Q_INVOKABLE void stopRecording ();
+
+ Q_INVOKABLE void join ();
+ Q_INVOKABLE void leave ();
+
+signals:
+ void countChanged (int count);
+
+ void microMutedChanged (bool status);
+ void recordingChanged (bool status);
+ void conferenceChanged ();
+
+private:
+ int getCount () const {
+ return rowCount();
+ }
+
+ bool getMicroMuted () const;
+ void setMicroMuted (bool status);
+ float getMicroVu () const;
+
+ bool isInConference () const;
+
+ bool getRecording () const;
+
+ bool mRecording = false;
+ QString mLastRecordFile;
+};
+
+#endif // CONFERENCE_MODEL_H_
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.cpp
new file mode 100644
index 000000000..be7e8f007
--- /dev/null
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.cpp
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2021 Belledonne Communications SARL.
+ *
+ * This file is part of linphone-desktop
+ * (see https://www.linphone.org).
+ *
+ * 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 .
+ */
+
+#include
+#include
+#include
+
+#include "app/App.hpp"
+#include "components/conference/ConferenceAddModel.hpp"
+#include "components/conference/ConferenceHelperModel.hpp"
+#include "components/core/CoreHandlers.hpp"
+#include "components/core/CoreManager.hpp"
+#include "components/settings/SettingsModel.hpp"
+#include "utils/Utils.hpp"
+
+#include "ConferenceInfoListModel.hpp"
+#include "ConferenceInfoModel.hpp"
+
+// =============================================================================
+
+ConferenceInfoListModel::ConferenceInfoListModel (QObject *parent) : QAbstractListModel(parent) {
+ auto conferenceInfos = CoreManager::getInstance()->getCore()->getConferenceInformationList();
+ for(auto conferenceInfo : conferenceInfos){
+ mList << ConferenceInfoModel::create( conferenceInfo );
+ }
+}
+
+int ConferenceInfoListModel::rowCount (const QModelIndex &) const {
+ return mList.count();
+}
+
+QHash ConferenceInfoListModel::roleNames () const {
+ QHash roles;
+ roles[Qt::DisplayRole] = "$conferenceInfo";
+ return roles;
+}
+
+QVariant ConferenceInfoListModel::data (const QModelIndex &index, int role) const {
+ int row = index.row();
+
+ if (!index.isValid() || row < 0 || row >= mList.count())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return QVariant::fromValue(mList[row].get());
+
+ //return QVariant();
+}
+
+// -----------------------------------------------------------------------------
+
+
+bool ConferenceInfoListModel::removeRow (int row, const QModelIndex &parent) {
+ return removeRows(row, 1, parent);
+}
+
+bool ConferenceInfoListModel::removeRows (int row, int count, const QModelIndex &parent) {
+ int limit = row + count - 1;
+
+ if (row < 0 || count < 0 || limit >= mList.count())
+ return false;
+
+ beginRemoveRows(parent, row, limit);
+
+ for (int i = 0; i < count; ++i)
+ mList.takeAt(row)->deleteLater();
+
+ endRemoveRows();
+
+ return true;
+}
+
+// -----------------------------------------------------------------------------
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.hpp
new file mode 100644
index 000000000..395b42c6e
--- /dev/null
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.hpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2021 Belledonne Communications SARL.
+ *
+ * This file is part of linphone-desktop
+ * (see https://www.linphone.org).
+ *
+ * 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 .
+ */
+
+#ifndef _CONFERENCE_INFO_LIST_MODEL_H_
+#define _CONFERENCE_INFO_LIST_MODEL_H_
+
+#include
+#include
+
+// =============================================================================
+
+class ConferenceInfoModel;
+
+class ConferenceInfoListModel : public QAbstractListModel {
+ Q_OBJECT
+
+public:
+ ConferenceInfoListModel (QObject *parent = Q_NULLPTR);
+
+ int rowCount (const QModelIndex &index = QModelIndex()) const override;
+
+ QHash roleNames () const override;
+ QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const override;
+
+
+private:
+ bool removeRow (int row, const QModelIndex &parent = QModelIndex());
+ bool removeRows (int row, int count, const QModelIndex &parent = QModelIndex()) override;
+
+ QList> mList;
+
+};
+
+#endif
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp
new file mode 100644
index 000000000..cf2933449
--- /dev/null
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2021 Belledonne Communications SARL.
+ *
+ * This file is part of linphone-desktop
+ * (see https://www.linphone.org).
+ *
+ * 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 .
+ */
+
+#include "ConferenceInfoModel.hpp"
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "app/App.hpp"
+#include "app/paths/Paths.hpp"
+#include "app/providers/ThumbnailProvider.hpp"
+#include "components/calls/CallsListModel.hpp"
+#include "components/chat-events/ChatCallModel.hpp"
+#include "components/chat-events/ChatEvent.hpp"
+#include "components/chat-events/ChatMessageModel.hpp"
+#include "components/chat-events/ChatNoticeModel.hpp"
+#include "components/contact/ContactModel.hpp"
+#include "components/contact/VcardModel.hpp"
+#include "components/contacts/ContactsListModel.hpp"
+#include "components/core/CoreHandlers.hpp"
+#include "components/core/CoreManager.hpp"
+#include "components/notifier/Notifier.hpp"
+#include "components/settings/AccountSettingsModel.hpp"
+#include "components/settings/SettingsModel.hpp"
+#include "components/participant/ParticipantModel.hpp"
+#include "components/participant/ParticipantListModel.hpp"
+#include "components/presence/Presence.hpp"
+#include "components/recorder/RecorderManager.hpp"
+#include "components/recorder/RecorderModel.hpp"
+#include "components/timeline/TimelineModel.hpp"
+#include "components/timeline/TimelineListModel.hpp"
+#include "components/core/event-count-notifier/AbstractEventCountNotifier.hpp"
+#include "utils/QExifImageHeader.hpp"
+#include "utils/Utils.hpp"
+#include "utils/Constants.hpp"
+#include "utils/LinphoneEnums.hpp"
+
+
+
+// =============================================================================
+
+using namespace std;
+
+// -----------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+std::shared_ptr ConferenceInfoModel::create(std::shared_ptr conferenceInfo){
+ std::shared_ptr model = std::make_shared(conferenceInfo);
+ if(model){
+ //model->mSelf = model;
+ //chatRoom->addListener(model);
+ return model;
+ }else
+ return nullptr;
+}
+
+ConferenceInfoModel::ConferenceInfoModel (QObject * parent) : QObject(parent){
+ //App::getInstance()->getEngine()->setObjectOwnership(this, QQmlEngine::CppOwnership);// Avoid QML to destroy it when passing by Q_INVOKABLE
+ mConferenceInfo = linphone::Factory::get()->createConferenceInfo();
+}
+
+ConferenceInfoModel::ConferenceInfoModel (std::shared_ptr conferenceInfo, QObject * parent) : QObject(parent){
+ App::getInstance()->getEngine()->setObjectOwnership(this, QQmlEngine::CppOwnership);// Avoid QML to destroy it when passing by Q_INVOKABLE
+
+ mConferenceInfo = conferenceInfo;
+}
+
+ConferenceInfoModel::~ConferenceInfoModel () {
+}
+
+std::shared_ptr ConferenceInfoModel::getConferenceInfo(){
+ return mConferenceInfo;
+}
+
+
+//------------------------------------------------------------------------------------------------
+
+
+QDateTime ConferenceInfoModel::getDateTime() const{
+ return QDateTime::fromMSecsSinceEpoch(mConferenceInfo->getDateTime() * 1000);
+}
+
+int ConferenceInfoModel::getDuration() const{
+ return mConferenceInfo->getDuration();
+}
+
+QString ConferenceInfoModel::getOrganizer() const{
+ return QString::fromStdString(mConferenceInfo->getOrganizer()->asString());
+}
+
+QString ConferenceInfoModel::getSubject() const{
+ return QString::fromStdString(mConferenceInfo->getSubject());
+}
+
+QString ConferenceInfoModel::getDescription() const{
+ return QString::fromStdString(mConferenceInfo->getDescription());
+}
+
+QString ConferenceInfoModel::displayNamesToString()const{
+ QStringList txt;
+ for(auto participant : mConferenceInfo->getParticipants()){
+ if(participant){
+ QString displayName = Utils::getDisplayName(participant);
+ if(displayName != "")
+ txt << displayName;
+ }
+ }
+ //txt.removeFirst();// Remove me
+ return txt.join(", ");
+}
+
+QString ConferenceInfoModel::getUri() const{
+ return QString::fromStdString(mConferenceInfo->getUri()->asString());
+}
+
+//------------------------------------------------------------------------------------------------
+
+void ConferenceInfoModel::setDateTime(const QDateTime& dateTime){
+ mConferenceInfo->setDateTime(dateTime.toMSecsSinceEpoch() / 1000);
+ emit dateTimeChanged();
+}
+
+void ConferenceInfoModel::setDuration(const int& duration){
+ mConferenceInfo->setDuration(duration);
+ emit durationChanged();
+}
+
+void ConferenceInfoModel::setSubject(const QString& subject){
+ mConferenceInfo->setSubject(subject.toStdString());
+ emit subjectChanged();
+}
+
+void ConferenceInfoModel::setOrganizer(const QString& organizerAddress){
+ mConferenceInfo->setOrganizer(Utils::interpretUrl(organizerAddress));
+ emit organizerChanged();
+}
+
+void ConferenceInfoModel::setDescription(const QString& description){
+ mConferenceInfo->setDescription(description.toStdString());
+ emit descriptionChanged();
+}
+
+void ConferenceInfoModel::setParticipants(ParticipantListModel * participants){
+ mConferenceInfo->setParticipants(participants->getParticipants());
+}
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp
new file mode 100644
index 000000000..9046dab2a
--- /dev/null
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2021 Belledonne Communications SARL.
+ *
+ * This file is part of linphone-desktop
+ * (see https://www.linphone.org).
+ *
+ * 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 .
+ */
+
+#ifndef CONFERENCE_INFO_MODEL_H_
+#define CONFERENCE_INFO_MODEL_H_
+
+#include
+#include
+#include
+
+class ParticipantListModel;
+
+class ConferenceInfoModel : public QObject{
+ Q_OBJECT
+
+public:
+
+ Q_PROPERTY(QDateTime dateTime READ getDateTime WRITE setDateTime NOTIFY dateTimeChanged)
+ Q_PROPERTY(int duration READ getDuration WRITE setDuration NOTIFY durationChanged)
+ Q_PROPERTY(QString organizer READ getOrganizer WRITE setOrganizer NOTIFY organizerChanged)
+ Q_PROPERTY(QString subject READ getSubject WRITE setSubject NOTIFY subjectChanged)
+ Q_PROPERTY(QString description READ getDescription WRITE setDescription NOTIFY descriptionChanged)
+ Q_PROPERTY(QString displayNamesToString READ displayNamesToString NOTIFY participantsChanged)
+ Q_PROPERTY(QString uri READ getUri NOTIFY uriChanged)
+
+ //Q_PROPERTY(participants READ getParticipants WRITE setParticipants NOTIFY participantsChanged)
+
+ static std::shared_ptr create(std::shared_ptr conferenceInfo);
+ ConferenceInfoModel (QObject * parent = nullptr);
+ ConferenceInfoModel (std::shared_ptr conferenceInfo, QObject * parent = nullptr);
+ ~ConferenceInfoModel ();
+ std::shared_ptr getConferenceInfo();
+
+//-------------------------------
+
+ QDateTime getDateTime() const;
+ int getDuration() const;
+ QString getOrganizer() const;
+ QString getSubject() const;
+ QString getDescription() const;
+ Q_INVOKABLE QString displayNamesToString()const;
+ QString getUri() const;
+
+ void setDateTime(const QDateTime& dateTime);
+ void setDuration(const int& duration);
+ void setSubject(const QString& subject);
+ void setOrganizer(const QString& organizerAddress);
+ void setDescription(const QString& description);
+
+ Q_INVOKABLE void setParticipants(ParticipantListModel * participants);
+
+
+signals:
+ void dateTimeChanged();
+ void durationChanged();
+ void organizerChanged();
+ void subjectChanged();
+ void descriptionChanged();
+ void participantsChanged();
+ void uriChanged();
+
+private:
+ std::shared_ptr mConferenceInfo;
+
+};
+
+Q_DECLARE_METATYPE(std::shared_ptr)
+
+#endif
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp
new file mode 100644
index 000000000..aa347ef67
--- /dev/null
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.cpp
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2021 Belledonne Communications SARL.
+ *
+ * This file is part of linphone-desktop
+ * (see https://www.linphone.org).
+ *
+ * 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 .
+ */
+
+#include "components/call/CallModel.hpp"
+#include "components/core/CoreManager.hpp"
+
+#include "ConferenceInfoListModel.hpp"
+#include "ConferenceInfoProxyModel.hpp"
+
+// =============================================================================
+
+using namespace std;
+
+ConferenceInfoProxyModel::ConferenceInfoProxyModel (QObject *parent) : QSortFilterProxyModel(parent) {
+ setSourceModel(new ConferenceInfoListModel());
+ sort(0);
+}
+
+bool ConferenceInfoProxyModel::filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const {
+ return true;
+}
diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.hpp
new file mode 100644
index 000000000..f687a3299
--- /dev/null
+++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoProxyModel.hpp
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2010-2020 Belledonne Communications SARL.
+ *
+ * This file is part of linphone-desktop
+ * (see https://www.linphone.org).
+ *
+ * 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 .
+ */
+
+#ifndef CONFERENCE_INFO_PROXY_MODEL_H_
+#define CONFERENCE_INFO_PROXY_MODEL_H_
+
+#include
+
+#include "ConferenceInfoModel.hpp"
+
+// =============================================================================
+
+class QWindow;
+
+class ConferenceInfoProxyModel : public QSortFilterProxyModel {
+ class ChatRoomModelFilter;
+
+ Q_OBJECT
+
+
+public:
+ ConferenceInfoProxyModel (QObject *parent = Q_NULLPTR);
+
+protected:
+ bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override;
+ //bool lessThan (const QModelIndex &left, const QModelIndex &right) const override;
+
+private:
+
+ ConferenceInfoModel *getConferenceInfoModel() const;
+ void setConferenceInfoModel (ConferenceInfoModel *conferenceInfoModel);
+
+ std::shared_ptr mConferenceInfoModel;
+};
+
+#endif
diff --git a/linphone-app/src/components/core/CoreHandlers.cpp b/linphone-app/src/components/core/CoreHandlers.cpp
index 8b078a85f..19787d21c 100644
--- a/linphone-app/src/components/core/CoreHandlers.cpp
+++ b/linphone-app/src/components/core/CoreHandlers.cpp
@@ -323,3 +323,21 @@ void CoreHandlers::onEcCalibrationResult(
) {
emit ecCalibrationResult(status, delayMs);
}
+
+//------------------------------ CONFERENCE INFO
+
+void CoreHandlers::onConferenceInfoCreated(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo){
+ qWarning() << "onConferenceInfoCreated";
+}
+
+void CoreHandlers::onConferenceInfoOnSent(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo){
+ qWarning() << "onConferenceInfoOnSent";
+}
+
+void CoreHandlers::onConferenceInfoParticipantSent(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo, const std::shared_ptr & participant){
+ qWarning() << "onConferenceInfoParticipantSent";
+}
+
+void CoreHandlers::onConferenceInfoParticipantError(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo, const std::shared_ptr & participant, linphone::ConferenceInfoError error){
+ qWarning() << "onConferenceInfoParticipantError";
+}
\ No newline at end of file
diff --git a/linphone-app/src/components/core/CoreHandlers.hpp b/linphone-app/src/components/core/CoreHandlers.hpp
index 9dc52ceaa..05c32be87 100644
--- a/linphone-app/src/components/core/CoreHandlers.hpp
+++ b/linphone-app/src/components/core/CoreHandlers.hpp
@@ -60,7 +60,6 @@ signals:
void setLastRemoteProvisioningState(const linphone::ConfiguringState &state);
private:
-
// ---------------------------------------------------------------------------
// Linphone callbacks.
// ---------------------------------------------------------------------------
@@ -159,8 +158,13 @@ private:
const std::shared_ptr &core,
const std::shared_ptr &linphoneFriend
) override;
-
- //void onRegistrationStateChanged (
+
+ void onRegistrationStateChanged (
+ const std::shared_ptr &core,
+ const std::shared_ptr &proxyConfig,
+ linphone::RegistrationState state,
+ const std::string &message
+ ) override;
void onTransferStateChanged (
const std::shared_ptr &core,
@@ -181,6 +185,13 @@ private:
int delayMs
) override;
+ // Conference Info
+ virtual void onConferenceInfoCreated(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo);
+ virtual void onConferenceInfoOnSent(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo);
+ virtual void onConferenceInfoParticipantSent(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo, const std::shared_ptr & participant);
+ virtual void onConferenceInfoParticipantError(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo, const std::shared_ptr & participant, linphone::ConferenceInfoError error);
+
+
// ---------------------------------------------------------------------------
};
diff --git a/linphone-app/src/components/other/colors/ColorListModel.hpp b/linphone-app/src/components/other/colors/ColorListModel.hpp
index 4529d9597..a2a192d41 100644
--- a/linphone-app/src/components/other/colors/ColorListModel.hpp
+++ b/linphone-app/src/components/other/colors/ColorListModel.hpp
@@ -111,6 +111,8 @@ class ColorListModel : public QAbstractListModel {
ADD_COLOR("event_neutral", "#424242", "Event colors that are neutral")
ADD_COLOR("event_in", "#96C11F", "Event colors that are incoming")
ADD_COLOR("event_out", "#18A7AF", "Event colors that are outgoing")
+
+ ADD_COLOR("conference_bg", "#D0D8DE", "Conferences : Background entry")
// Standard actions
//
diff --git a/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp
index f315d329b..6588735fd 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp
@@ -38,6 +38,17 @@ ParticipantDeviceListModel::ParticipantDeviceListModel (std::shared_ptrisConference()) {
+ std::list> devices = callModel->getConferenceModel()->getConference()->getParticipantDeviceList();
+ for(auto device : devices){
+ auto deviceModel = std::make_shared(device);
+ connect(this, &ParticipantDeviceListModel::securityLevelChanged, deviceModel.get(), &ParticipantDeviceModel::onSecurityLevelChanged);
+ mList << deviceModel;
+ }
+ }
+}
+
int ParticipantDeviceListModel::rowCount (const QModelIndex &index) const{
return mList.count();
}
diff --git a/linphone-app/src/components/participant/ParticipantDeviceListModel.hpp b/linphone-app/src/components/participant/ParticipantDeviceListModel.hpp
index 41f1d42fb..818e4bc13 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceListModel.hpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceListModel.hpp
@@ -29,6 +29,7 @@
#include
#include
+class CallModel;
class ParticipantDeviceModel;
class ParticipantDeviceListModel : public QAbstractListModel {
@@ -36,6 +37,7 @@ class ParticipantDeviceListModel : public QAbstractListModel {
public:
ParticipantDeviceListModel (std::shared_ptr participant, QObject *parent = nullptr);
+ ParticipantDeviceListModel (CallModel * callModel, QObject *parent = nullptr);
int rowCount (const QModelIndex &index = QModelIndex()) const override;
int count();
diff --git a/linphone-app/src/components/participant/ParticipantDeviceProxyModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceProxyModel.cpp
index fc4877d11..9dbdefc74 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceProxyModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceProxyModel.cpp
@@ -51,7 +51,15 @@ bool ParticipantDeviceProxyModel::lessThan (const QModelIndex &left, const QMode
return deviceA->getTimeOfJoining() > deviceB->getTimeOfJoining();
}
//---------------------------------------------------------------------------------
-
+CallModel * ParticipantDeviceProxyModel::getCallModel() const{
+ return mCallModel;
+}
+
+void ParticipantDeviceProxyModel::setCallModel(CallModel * callModel){
+ mCallModel = callModel;
+ setSourceModel(new ParticipantDeviceListModel(mCallModel));
+}
+
void ParticipantDeviceProxyModel::setParticipant(ParticipantModel * participant){
setSourceModel(participant->getParticipantDevices().get());
}
\ No newline at end of file
diff --git a/linphone-app/src/components/participant/ParticipantDeviceProxyModel.hpp b/linphone-app/src/components/participant/ParticipantDeviceProxyModel.hpp
index 404a673fb..7f92e1260 100644
--- a/linphone-app/src/components/participant/ParticipantDeviceProxyModel.hpp
+++ b/linphone-app/src/components/participant/ParticipantDeviceProxyModel.hpp
@@ -31,20 +31,29 @@
class ParticipantDeviceListModel;
class ParticipantModel;
+class CallModel;
class ParticipantDeviceProxyModel : public QSortFilterProxyModel {
Q_OBJECT
public:
+ Q_PROPERTY(CallModel * callModel READ getCallModel WRITE setCallModel NOTIFY callModelChanged)
ParticipantDeviceProxyModel (QObject *parent = nullptr);
+ CallModel * getCallModel() const;
+
+ void setCallModel(CallModel * callModel);
void setParticipant(ParticipantModel * participant);
+signals:
+ void callModelChanged();
+
protected:
virtual bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override;
virtual bool lessThan (const QModelIndex &left, const QModelIndex &right) const override;
std::shared_ptr mDevices;
+ CallModel * mCallModel;
};
diff --git a/linphone-app/src/components/participant/ParticipantListModel.cpp b/linphone-app/src/components/participant/ParticipantListModel.cpp
index 9d9c988f9..a318cd411 100644
--- a/linphone-app/src/components/participant/ParticipantListModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantListModel.cpp
@@ -70,6 +70,14 @@ int ParticipantListModel::getCount() const{
return mParticipants.size();
}
+std::list> ParticipantListModel::getParticipants()const{
+ std::list> participants;
+ for(auto participant : mParticipants){
+ participants.push_back(Utils::interpretUrl(participant->getSipAddress()));
+ }
+ return participants;
+}
+
QString ParticipantListModel::addressesToString()const{
QStringList txt;
for(auto participant : mParticipants){
diff --git a/linphone-app/src/components/participant/ParticipantListModel.hpp b/linphone-app/src/components/participant/ParticipantListModel.hpp
index ce438d42e..1c033f59d 100644
--- a/linphone-app/src/components/participant/ParticipantListModel.hpp
+++ b/linphone-app/src/components/participant/ParticipantListModel.hpp
@@ -56,6 +56,7 @@ public:
Q_INVOKABLE void remove (ParticipantModel *importer);
Q_INVOKABLE ChatRoomModel* getChatRoomModel() const;
int getCount() const;
+ std::list> getParticipants()const;
Q_INVOKABLE QString addressesToString()const;
Q_INVOKABLE QString displayNamesToString()const;
diff --git a/linphone-app/src/components/participant/ParticipantProxyModel.cpp b/linphone-app/src/components/participant/ParticipantProxyModel.cpp
index 9a7d8a5e1..4aa07211e 100644
--- a/linphone-app/src/components/participant/ParticipantProxyModel.cpp
+++ b/linphone-app/src/components/participant/ParticipantProxyModel.cpp
@@ -45,6 +45,10 @@ ChatRoomModel *ParticipantProxyModel::getChatRoomModel() const{
return mChatRoomModel;
}
+ParticipantListModel * ParticipantProxyModel::getParticipantListModel() const{
+ return dynamic_cast(sourceModel());
+}
+
QStringList ParticipantProxyModel::getSipAddresses() const{
QStringList participants;
ParticipantListModel * list = dynamic_cast(sourceModel());
@@ -77,10 +81,12 @@ void ParticipantProxyModel::setChatRoomModel(ChatRoomModel * chatRoomModel){
if(mChatRoomModel) {
auto participants = mChatRoomModel->getParticipants();
setSourceModel(participants);
+ emit participantListModelChanged();
for(int i = 0 ; i < participants->getCount() ; ++i)
emit addressAdded(participants->getAt(i)->getSipAddress());
}else {
setSourceModel(new ParticipantListModel(nullptr, this));
+ emit participantListModelChanged();
}
sort(0);
emit chatRoomModelChanged();
diff --git a/linphone-app/src/components/participant/ParticipantProxyModel.hpp b/linphone-app/src/components/participant/ParticipantProxyModel.hpp
index ab44b52b4..8a042b3f4 100644
--- a/linphone-app/src/components/participant/ParticipantProxyModel.hpp
+++ b/linphone-app/src/components/participant/ParticipantProxyModel.hpp
@@ -40,6 +40,7 @@ public:
ParticipantProxyModel ( QObject *parent = Q_NULLPTR);
Q_PROPERTY(ChatRoomModel* chatRoomModel READ getChatRoomModel WRITE setChatRoomModel NOTIFY chatRoomModelChanged)
+ Q_PROPERTY(ParticipantListModel * participantListModel READ getParticipantListModel NOTIFY participantListModelChanged)
Q_PROPERTY(int count READ getCount NOTIFY countChanged)
Q_PROPERTY(bool showMe READ getShowMe WRITE setShowMe NOTIFY showMeChanged)
@@ -47,6 +48,7 @@ public:
bool lessThan (const QModelIndex &left, const QModelIndex &right) const override;
ChatRoomModel *getChatRoomModel() const;
+ ParticipantListModel * getParticipantListModel() const;
Q_INVOKABLE QStringList getSipAddresses() const;
Q_INVOKABLE QVariantList getParticipants() const;
Q_INVOKABLE int getCount() const;
@@ -62,6 +64,7 @@ public:
signals:
void chatRoomModelChanged();
+ void participantListModelChanged();
void countChanged();
void showMeChanged();
void addressAdded(QString sipAddress);
diff --git a/linphone-app/src/components/timeline/TimelineListModel.cpp b/linphone-app/src/components/timeline/TimelineListModel.cpp
index 47b35acaf..b7af65897 100644
--- a/linphone-app/src/components/timeline/TimelineListModel.cpp
+++ b/linphone-app/src/components/timeline/TimelineListModel.cpp
@@ -152,7 +152,26 @@ std::shared_ptr TimelineListModel::getTimeline(std::shared_ptr