mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 12:15:01 +00:00
Merge 87ab43c745 into 61c638452b
This commit is contained in:
@@ -752,10 +752,10 @@ namespace PepperDash.Essentials
|
|||||||
/// 15044 Close button for source modal overlay
|
/// 15044 Close button for source modal overlay
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint SourceBackgroundOverlayClosePress = 15044;
|
public const uint SourceBackgroundOverlayClosePress = 15044;
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 15045 - Visibility for the bar containing call navigation button list
|
///// 15045 - Visibility for the bar containing call navigation button list
|
||||||
/// </summary>
|
///// </summary>
|
||||||
public const uint CallStagingBarVisible = 15045;
|
//public const uint CallStagingBarVisible = 15045;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15046
|
/// 15046
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -173,10 +173,28 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; private set; }
|
public PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
private UiDisplayMode _currentMode;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The mode showing. Presentation or call.
|
/// The mode showing. Presentation or call.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
UiDisplayMode CurrentMode = UiDisplayMode.Start;
|
UiDisplayMode CurrentMode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _currentMode;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value != _currentMode)
|
||||||
|
{
|
||||||
|
_currentMode = value;
|
||||||
|
|
||||||
|
SetActivityFooterFeedbacks();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CTimer NextMeetingTimer;
|
CTimer NextMeetingTimer;
|
||||||
|
|
||||||
@@ -207,6 +225,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
MeetingOrContactMethodModalSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.MeetingListSRL, 3, 3, 5);
|
MeetingOrContactMethodModalSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.MeetingListSRL, 3, 3, 5);
|
||||||
|
|
||||||
|
CurrentMode = UiDisplayMode.Start;
|
||||||
|
|
||||||
// buttons are added in SetCurrentRoom
|
// buttons are added in SetCurrentRoom
|
||||||
//HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
|
//HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
|
||||||
@@ -607,11 +626,21 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void SetActivityFooterFeedbacks()
|
void SetActivityFooterFeedbacks()
|
||||||
{
|
{
|
||||||
CallButtonSig.BoolValue = CurrentMode == UiDisplayMode.Call
|
if (CurrentRoom != null)
|
||||||
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
{
|
||||||
ShareButtonSig.BoolValue = CurrentMode == UiDisplayMode.Presentation
|
var startMode = CurrentMode == UiDisplayMode.Start;
|
||||||
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
var presentationMode = CurrentMode == UiDisplayMode.Presentation;
|
||||||
EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None;
|
var callMode = CurrentMode == UiDisplayMode.Call;
|
||||||
|
|
||||||
|
TriList.SetBool(StartPageVisibleJoin, startMode ? true : false);
|
||||||
|
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false);
|
||||||
|
|
||||||
|
CallButtonSig.BoolValue = callMode
|
||||||
|
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
||||||
|
ShareButtonSig.BoolValue = presentationMode
|
||||||
|
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
||||||
|
EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -623,14 +652,13 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
HideLogo();
|
HideLogo();
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
TriList.SetBool(StartPageVisibleJoin, false);
|
//TriList.SetBool(StartPageVisibleJoin, false);
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
//TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
//TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||||
if (CurrentSourcePageManager != null)
|
if (CurrentSourcePageManager != null)
|
||||||
CurrentSourcePageManager.Hide();
|
CurrentSourcePageManager.Hide();
|
||||||
PowerOnFromCall();
|
PowerOnFromCall();
|
||||||
CurrentMode = UiDisplayMode.Call;
|
CurrentMode = UiDisplayMode.Call;
|
||||||
SetActivityFooterFeedbacks();
|
|
||||||
VCDriver.Show();
|
VCDriver.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -643,9 +671,6 @@ namespace PepperDash.Essentials
|
|||||||
if (VCDriver.IsVisible)
|
if (VCDriver.IsVisible)
|
||||||
VCDriver.Hide();
|
VCDriver.Hide();
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
TriList.SetBool(StartPageVisibleJoin, false);
|
|
||||||
TriList.SetBool(UIBoolJoin.CallStagingBarVisible, false);
|
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true);
|
|
||||||
// Run default source when room is off and share is pressed
|
// Run default source when room is off and share is pressed
|
||||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
@@ -665,7 +690,6 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
CurrentMode = UiDisplayMode.Presentation;
|
CurrentMode = UiDisplayMode.Presentation;
|
||||||
SetupSourceList();
|
SetupSourceList();
|
||||||
SetActivityFooterFeedbacks();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -707,6 +731,8 @@ namespace PepperDash.Essentials
|
|||||||
if (CurrentRoom.CurrentSourceInfo == null)
|
if (CurrentRoom.CurrentSourceInfo == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
CurrentMode = UiDisplayMode.Presentation;
|
||||||
|
|
||||||
if (CurrentRoom.CurrentSourceInfo.SourceDevice == null)
|
if (CurrentRoom.CurrentSourceInfo.SourceDevice == null)
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
@@ -1218,9 +1244,8 @@ namespace PepperDash.Essentials
|
|||||||
VCDriver.Hide();
|
VCDriver.Hide();
|
||||||
SetupActivityFooterWhenRoomOff();
|
SetupActivityFooterWhenRoomOff();
|
||||||
ShowLogo();
|
ShowLogo();
|
||||||
SetActivityFooterFeedbacks();
|
//TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false;
|
//TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
|
||||||
// Clear this so that the pesky meeting warning can resurface every minute when off
|
// Clear this so that the pesky meeting warning can resurface every minute when off
|
||||||
LastMeetingDismissedId = null;
|
LastMeetingDismissedId = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1080,10 +1080,12 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
{
|
{
|
||||||
var codec = Codec as IHasDirectory;
|
var codec = Codec as IHasDirectory;
|
||||||
|
|
||||||
SetCurrentDirectoryToRoot();
|
if (codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue)
|
||||||
|
{
|
||||||
RefreshDirectory();
|
SetCurrentDirectoryToRoot();
|
||||||
|
|
||||||
|
RefreshDirectory();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1161,10 +1163,23 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (dc.ContactMethods.Count == 1)
|
||||||
|
{
|
||||||
|
var invitableContact = dc as IInvitableContact;
|
||||||
|
|
||||||
|
if (invitableContact != null)
|
||||||
|
{
|
||||||
|
DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(invitableContact); });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// If only one contact method, just dial that method
|
||||||
|
DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(dc.ContactMethods[0].Number); });
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If only one contact method, just dial that method
|
Debug.Console(1, "Unable to dial contact. No availble ContactMethod(s) specified");
|
||||||
DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(dc.ContactMethods[0].Number); });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // is DirectoryFolder
|
else // is DirectoryFolder
|
||||||
|
|||||||
@@ -69,6 +69,22 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
[JsonProperty("directoryResults")]
|
[JsonProperty("directoryResults")]
|
||||||
public List<DirectoryItem> CurrentDirectoryResults { get; private set; }
|
public List<DirectoryItem> CurrentDirectoryResults { get; private set; }
|
||||||
|
|
||||||
|
public List<DirectoryItem> Contacts
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return CurrentDirectoryResults.OfType<DirectoryContact>().Cast<DirectoryItem>().ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DirectoryItem> Folders
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return CurrentDirectoryResults.OfType<DirectoryFolder>().Cast<DirectoryItem>().ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to store the ID of the current folder for CurrentDirectoryResults
|
/// Used to store the ID of the current folder for CurrentDirectoryResults
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -104,6 +120,15 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
SortDirectory();
|
SortDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Filters the CurrentDirectoryResults by the predicate
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="predicate"></param>
|
||||||
|
public void FilterContacts(Func<DirectoryItem, bool> predicate)
|
||||||
|
{
|
||||||
|
CurrentDirectoryResults = CurrentDirectoryResults.Where(predicate).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sorts the DirectoryResults list to display all folders alphabetically, then all contacts alphabetically
|
/// Sorts the DirectoryResults list to display all folders alphabetically, then all contacts alphabetically
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -276,6 +276,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
if (zoomRooms.Count > 0)
|
if (zoomRooms.Count > 0)
|
||||||
{
|
{
|
||||||
// If so, setup a rooms and contacts folder and add them.
|
// If so, setup a rooms and contacts folder and add them.
|
||||||
|
|
||||||
|
directory.ResultsFolderId = "root";
|
||||||
|
|
||||||
roomFolder.Name = "Rooms";
|
roomFolder.Name = "Rooms";
|
||||||
roomFolder.ParentFolderId = "root";
|
roomFolder.ParentFolderId = "root";
|
||||||
roomFolder.FolderId = "rooms";
|
roomFolder.FolderId = "rooms";
|
||||||
@@ -292,22 +295,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (zoomContacts.Count == 0) return directory;
|
if (zoomContacts.Count == 0)
|
||||||
|
{
|
||||||
|
return directory;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Contact c in zoomContacts)
|
||||||
{
|
{
|
||||||
foreach (Contact c in zoomContacts)
|
var contact = new ZoomDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
|
||||||
|
|
||||||
|
contact.ContactMethods.Add(new ContactMethod() { Number = c.Jid, Device = eContactMethodDevice.Video, CallType = eContactMethodCallType.Video, ContactMethodId = c.Jid });
|
||||||
|
|
||||||
|
if (folders.Count > 0)
|
||||||
{
|
{
|
||||||
var contact = new ZoomDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
|
contact.ParentFolderId = c.IsZoomRoom ? "rooms" : "contacts";
|
||||||
|
|
||||||
if (folders.Count > 0)
|
|
||||||
{
|
|
||||||
contact.ParentFolderId = c.IsZoomRoom ? "rooms" : "contacts";
|
|
||||||
}
|
|
||||||
|
|
||||||
contacts.Add(contact);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
directory.AddContactsToDirectory(contacts);
|
contacts.Add(contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
directory.AddContactsToDirectory(contacts);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -361,6 +361,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
public CodecDirectory CurrentDirectoryResult
|
public CodecDirectory CurrentDirectoryResult
|
||||||
{
|
{
|
||||||
get { return _currentDirectoryResult; }
|
get { return _currentDirectoryResult; }
|
||||||
|
private set
|
||||||
|
{
|
||||||
|
_currentDirectoryResult = value;
|
||||||
|
|
||||||
|
Debug.Console(2, this, "CurrentDirectoryResult Updated. ResultsFolderId: {0}", _currentDirectoryResult.ResultsFolderId);
|
||||||
|
|
||||||
|
CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
|
||||||
|
|
||||||
|
OnDirectoryResultReturned(_currentDirectoryResult);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CodecPhonebookSyncState PhonebookSyncState { get; private set; }
|
public CodecPhonebookSyncState PhonebookSyncState { get; private set; }
|
||||||
@@ -374,9 +384,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
c => c.Name.IndexOf(searchString, 0, StringComparison.OrdinalIgnoreCase) > -1));
|
c => c.Name.IndexOf(searchString, 0, StringComparison.OrdinalIgnoreCase) > -1));
|
||||||
|
|
||||||
DirectoryBrowseHistoryStack.Clear();
|
DirectoryBrowseHistoryStack.Clear();
|
||||||
_currentDirectoryResult = directoryResults;
|
CurrentDirectoryResult = directoryResults;
|
||||||
|
|
||||||
OnDirectoryResultReturned(directoryResults);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GetDirectoryFolderContents(string folderId)
|
public void GetDirectoryFolderContents(string folderId)
|
||||||
@@ -388,19 +397,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
DirectoryBrowseHistoryStack.Push(_currentDirectoryResult);
|
DirectoryBrowseHistoryStack.Push(_currentDirectoryResult);
|
||||||
|
|
||||||
_currentDirectoryResult = directoryResults;
|
CurrentDirectoryResult = directoryResults;
|
||||||
|
|
||||||
OnDirectoryResultReturned(directoryResults);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCurrentDirectoryToRoot()
|
public void SetCurrentDirectoryToRoot()
|
||||||
{
|
{
|
||||||
DirectoryBrowseHistoryStack.Clear();
|
DirectoryBrowseHistoryStack.Clear();
|
||||||
|
|
||||||
_currentDirectoryResult = DirectoryRoot;
|
CurrentDirectoryResult = DirectoryRoot;
|
||||||
|
}
|
||||||
OnDirectoryResultReturned(DirectoryRoot);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GetDirectoryParentFolderContents()
|
public void GetDirectoryParentFolderContents()
|
||||||
{
|
{
|
||||||
@@ -411,10 +417,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
var currentDirectory = DirectoryBrowseHistoryStack.Pop();
|
var currentDirectory = DirectoryBrowseHistoryStack.Pop();
|
||||||
|
|
||||||
_currentDirectoryResult = currentDirectory;
|
CurrentDirectoryResult = currentDirectory;
|
||||||
|
}
|
||||||
OnDirectoryResultReturned(currentDirectory);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BoolFeedback CurrentDirectoryResultIsNotDirectoryRoot { get; private set; }
|
public BoolFeedback CurrentDirectoryResultIsNotDirectoryRoot { get; private set; }
|
||||||
|
|
||||||
@@ -680,16 +684,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
private void SetUpDirectory()
|
private void SetUpDirectory()
|
||||||
{
|
{
|
||||||
DirectoryRoot = new CodecDirectory();
|
DirectoryRoot = new CodecDirectory() { ResultsFolderId = "root" };
|
||||||
|
|
||||||
_currentDirectoryResult = DirectoryRoot;
|
CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => CurrentDirectoryResult.ResultsFolderId != "root");
|
||||||
|
|
||||||
|
CurrentDirectoryResult = DirectoryRoot;
|
||||||
|
|
||||||
DirectoryBrowseHistory = new List<CodecDirectory>();
|
DirectoryBrowseHistory = new List<CodecDirectory>();
|
||||||
DirectoryBrowseHistoryStack = new Stack<CodecDirectory>();
|
DirectoryBrowseHistoryStack = new Stack<CodecDirectory>();
|
||||||
|
|
||||||
CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => _currentDirectoryResult != DirectoryRoot);
|
|
||||||
|
|
||||||
CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetUpRouting()
|
private void SetUpRouting()
|
||||||
@@ -1063,24 +1066,30 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
case "phonebooklistresult":
|
case "phonebooklistresult":
|
||||||
{
|
{
|
||||||
|
// This result will always be the complete contents of the directory and never
|
||||||
|
// A subset of the results via a search
|
||||||
|
|
||||||
JsonConvert.PopulateObject(responseObj.ToString(), Status.Phonebook);
|
JsonConvert.PopulateObject(responseObj.ToString(), Status.Phonebook);
|
||||||
|
|
||||||
|
var directoryResults =
|
||||||
|
zStatus.Phonebook.ConvertZoomContactsToGeneric(Status.Phonebook.Contacts);
|
||||||
|
|
||||||
if (!PhonebookSyncState.InitialSyncComplete)
|
if (!PhonebookSyncState.InitialSyncComplete)
|
||||||
{
|
{
|
||||||
PhonebookSyncState.InitialPhonebookFoldersReceived();
|
PhonebookSyncState.InitialPhonebookFoldersReceived();
|
||||||
PhonebookSyncState.PhonebookRootEntriesReceived();
|
PhonebookSyncState.PhonebookRootEntriesReceived();
|
||||||
PhonebookSyncState.SetPhonebookHasFolders(false);
|
PhonebookSyncState.SetPhonebookHasFolders(true);
|
||||||
PhonebookSyncState.SetNumberOfContacts(Status.Phonebook.Contacts.Count);
|
PhonebookSyncState.SetNumberOfContacts(Status.Phonebook.Contacts.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
var directoryResults =
|
if (directoryResults.ResultsFolderId != "root")
|
||||||
zStatus.Phonebook.ConvertZoomContactsToGeneric(Status.Phonebook.Contacts);
|
{
|
||||||
|
directoryResults.ResultsFolderId = "root";
|
||||||
|
}
|
||||||
|
|
||||||
DirectoryRoot = directoryResults;
|
DirectoryRoot = directoryResults;
|
||||||
|
|
||||||
_currentDirectoryResult = DirectoryRoot;
|
CurrentDirectoryResult = directoryResults;
|
||||||
|
|
||||||
OnDirectoryResultReturned(directoryResults);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1236,7 +1245,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
Direction = eCodecCallDirection.Incoming,
|
Direction = eCodecCallDirection.Incoming,
|
||||||
Status = eCodecCallStatus.Ringing,
|
Status = eCodecCallStatus.Ringing,
|
||||||
Type = eCodecCallType.Unknown,
|
Type = eCodecCallType.Video,
|
||||||
Name = incomingCall.callerName,
|
Name = incomingCall.callerName,
|
||||||
Id = incomingCall.callerJID
|
Id = incomingCall.callerJID
|
||||||
};
|
};
|
||||||
@@ -1589,8 +1598,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
var newCall = new CodecActiveCallItem
|
var newCall = new CodecActiveCallItem
|
||||||
{
|
{
|
||||||
Name = Status.Call.Info.meeting_list_item.meetingName,
|
Name = Status.Call.Info.meeting_list_item.meetingName,
|
||||||
|
Number = Status.Call.Info.meeting_id,
|
||||||
Id = Status.Call.Info.meeting_id,
|
Id = Status.Call.Info.meeting_id,
|
||||||
Status = newStatus
|
Status = newStatus,
|
||||||
|
Type = eCodecCallType.Video,
|
||||||
};
|
};
|
||||||
|
|
||||||
ActiveCalls.Add(newCall);
|
ActiveCalls.Add(newCall);
|
||||||
@@ -2008,18 +2019,43 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
/// <param name="result"></param>
|
/// <param name="result"></param>
|
||||||
private void OnDirectoryResultReturned(CodecDirectory result)
|
private void OnDirectoryResultReturned(CodecDirectory result)
|
||||||
{
|
{
|
||||||
CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
|
try
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "OnDirectoryResultReturned");
|
||||||
|
|
||||||
// This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology
|
var directoryResult = new CodecDirectory();
|
||||||
var handler = DirectoryResultReturned;
|
|
||||||
if (handler != null)
|
// If result is Root, create a copy and filter out contacts whose parent folder is not root
|
||||||
{
|
if (!CurrentDirectoryResultIsNotDirectoryRoot.BoolValue)
|
||||||
handler(this, new DirectoryEventArgs
|
{
|
||||||
{
|
Debug.Console(2, this, "Filtering DirectoryRoot to remove contacts for display");
|
||||||
Directory = result,
|
|
||||||
DirectoryIsOnRoot = !CurrentDirectoryResultIsNotDirectoryRoot.BoolValue
|
directoryResult.ResultsFolderId = result.ResultsFolderId;
|
||||||
});
|
directoryResult.AddFoldersToDirectory(result.Folders);
|
||||||
}
|
directoryResult.AddContactsToDirectory(result.Contacts.Where((c) => c.ParentFolderId == result.ResultsFolderId).ToList());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
directoryResult = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Console(2, this, "Updating directoryResult. IsOnRoot: {0}", !CurrentDirectoryResultIsNotDirectoryRoot.BoolValue);
|
||||||
|
|
||||||
|
// This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology
|
||||||
|
var handler = DirectoryResultReturned;
|
||||||
|
if (handler != null)
|
||||||
|
{
|
||||||
|
handler(this, new DirectoryEventArgs
|
||||||
|
{
|
||||||
|
Directory = directoryResult,
|
||||||
|
DirectoryIsOnRoot = !CurrentDirectoryResultIsNotDirectoryRoot.BoolValue
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Error: {0}", e);
|
||||||
|
}
|
||||||
|
|
||||||
//PrintDirectory(result);
|
//PrintDirectory(result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user