diff --git a/Essentials Devices Common/Essentials Devices Common/Codec/iHasDialer.cs b/Essentials Devices Common/Essentials Devices Common/Codec/iHasDialer.cs index f179a269..6a18de99 100644 --- a/Essentials Devices Common/Essentials Devices Common/Codec/iHasDialer.cs +++ b/Essentials Devices Common/Essentials Devices Common/Codec/iHasDialer.cs @@ -15,6 +15,8 @@ namespace PepperDash.Essentials.Devices.Common.Codec { // Add requirements for Dialer functionality + event EventHandler CallStatusChange; + void Dial(string number); void EndCall(CodecActiveCallItem activeCall); void EndAllCalls(); @@ -22,6 +24,27 @@ namespace PepperDash.Essentials.Devices.Common.Codec void RejectCall(CodecActiveCallItem item); void SendDtmf(string digit); - BoolFeedback IncomingCallFeedback { get; } + //BoolFeedback IncomingCallFeedback { get; } + } + + + /// + /// + /// + public class CodecCallStatusItemChangeEventArgs : EventArgs + { + public CodecActiveCallItem CallItem { get; private set; } + + //public eCodecCallStatus PreviousStatus { get; private set; } + + //public eCodecCallStatus NewStatus { get; private set; } + + public CodecCallStatusItemChangeEventArgs(/*eCodecCallStatus previousStatus, + eCodecCallStatus newStatus,*/ CodecActiveCallItem item) + { + //PreviousStatus = previousStatus; + //NewStatus = newStatus; + CallItem = item; + } } } \ No newline at end of file diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs index 812e0d39..1aeb50aa 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs @@ -189,9 +189,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco } } -#warning Figure out where this func is or disappeared to - protected override Func IncomingCallFeedbackFunc { get { return () => false; } } - private string CliFeedbackRegistrationExpression; @@ -205,6 +202,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco public bool CommDebuggingIsOn; + string Delimiter = "\r\n"; int PresentationSource; @@ -242,8 +240,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco Communication = comm; - LoginMessageReceived = new CTimer(DisconnectClientAndReconnect, 5000); - if (props.CommunicationMonitorProperties != null) { CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, props.CommunicationMonitorProperties); @@ -253,6 +249,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, "xStatus SystemUnit Software Version\r"); } + if (props.Sharing != null) + AutoShareContentWhileInCall = props.Sharing.AutoShareContentWhileInCall; + + ShowSelfViewByDefault = props.ShowSelfViewByDefault; + DeviceManager.AddDevice(CommunicationMonitor); PhonebookMode = props.PhonebookMode; @@ -337,13 +338,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco /// public override bool CustomActivate() { - //CrestronConsole.AddNewConsoleCommand(SendText, "send" + Key, "", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(SetCommDebug, "SetCodecCommDebug", "0 for Off, 1 for on", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator); - //CommDebuggingIsOn = true; Communication.Connect(); + LoginMessageReceived = new CTimer(DisconnectClientAndReconnect, 5000); + var socket = Communication as ISocketStatus; if (socket != null) { @@ -550,22 +551,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco { bool changeDetected = false; + eCodecCallStatus newStatus = eCodecCallStatus.Unknown; + // Update properties of ActiveCallItem if(call.Status != null) if (!string.IsNullOrEmpty(call.Status.Value)) { - eCodecCallStatus newStatus = eCodecCallStatus.Unknown; - - newStatus = CodecCallStatus.ConvertToStatusEnum(call.Status.Value); - - if (newStatus != eCodecCallStatus.Unknown) - { - changeDetected = true; - SetNewCallStatusAndFireCallStatusChange(newStatus, tempActiveCall); - } + tempActiveCall.Status = CodecCallStatus.ConvertToStatusEnum(call.Status.Value); if (newStatus == eCodecCallStatus.Connected) GetCallHistory(); + + changeDetected = true; } if (call.CallType != null) if (!string.IsNullOrEmpty(call.CallType.Value)) @@ -590,6 +587,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco if (changeDetected) { + SetSelfViewMode(); + OnCallStatusChange(tempActiveCall); ListCalls(); } } @@ -611,7 +610,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco ListCalls(); - SetNewCallStatusAndFireCallStatusChange(newCallItem.Status, newCallItem); + SetSelfViewMode(); + OnCallStatusChange(newCallItem); } } @@ -756,6 +756,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco ListCalls(); + SetSelfViewMode(); // Notify of the call disconnection SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Disconnected, tempActiveCall); @@ -1100,6 +1101,24 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco SendText("xCommand SystemUnit Boot Action: Restart"); } + /// + /// Sets SelfView Mode based on config + /// + void SetSelfViewMode() + { + if (!IsInCall) + { + SelfviewModeOff(); + } + else + { + if (ShowSelfViewByDefault) + SelfviewModeOn(); + else + SelfviewModeOff(); + } + } + /// /// Turns on Selfview Mode /// diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodecPropertiesConfig.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodecPropertiesConfig.cs index 7ce5d90c..8763a570 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodecPropertiesConfig.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodecPropertiesConfig.cs @@ -13,8 +13,6 @@ namespace PepperDash.Essentials.Devices.Common.Codec { public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; } - //public ControlPropertiesConfig Control { get; set; } - public List Favorites { get; set; } /// @@ -22,5 +20,14 @@ namespace PepperDash.Essentials.Devices.Common.Codec /// public string PhonebookMode { get; set; } + public bool ShowSelfViewByDefault { get; set; } + + public SharingProperties Sharing { get; set; } + + } + + public class SharingProperties + { + public bool AutoShareContentWhileInCall { get; set; } } } \ No newline at end of file diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecSelfview.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecSelfview.cs index 657d402e..3bc43ec2 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecSelfview.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecSelfview.cs @@ -15,6 +15,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec { BoolFeedback SelfviewIsOnFeedback { get; } + bool ShowSelfViewByDefault { get; } + void SelfviewModeOn(); void SelfviewModeOff(); diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs index 9256bda8..c8b3c9d8 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs @@ -36,7 +36,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec } // Debug helpers - IncomingCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "IncomingCall={0}", _IncomingCall); MuteFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Mute={0}", _IsMuted); PrivacyModeIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Privacy={0}", _PrivacyModeIsOn); SharingSourceFeedback.OutputChange += (o, a) => Debug.Console(1, this, "SharingSource={0}", _SharingSource); @@ -64,12 +63,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec SetIsReady(); } - protected override Func IncomingCallFeedbackFunc - { - get { return () => _IncomingCall; } - } - bool _IncomingCall; - protected override Func MuteFeedbackFunc { get { return () => _IsMuted; } @@ -102,7 +95,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec Debug.Console(1, this, "Dial: {0}", number); var call = new CodecActiveCallItem() { Name = number, Number = number, Id = number, Status = eCodecCallStatus.Dialing }; ActiveCalls.Add(call); - OnCallStatusChange(eCodecCallStatus.Unknown, call.Status, call); + OnCallStatusChange(call); //ActiveCallCountFeedback.FireUpdate(); // Simulate 2-second ring, then connecting, then connected new CTimer(o => @@ -299,8 +292,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec var call = new CodecActiveCallItem() { Name = url, Id = url, Number = url, Type= eCodecCallType.Video, Direction = eCodecCallDirection.Incoming }; ActiveCalls.Add(call); SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Ringing, call); - _IncomingCall = true; - IncomingCallFeedback.FireUpdate(); + + //OnCallStatusChange(eCodecCallStatus.Unknown, eCodecCallStatus.Ringing, call); + } /// @@ -313,8 +307,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec var call = new CodecActiveCallItem() { Name = url, Id = url, Number = url, Type = eCodecCallType.Audio, Direction = eCodecCallDirection.Incoming }; ActiveCalls.Add(call); SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Ringing, call); - _IncomingCall = true; - IncomingCallFeedback.FireUpdate(); + + //OnCallStatusChange(eCodecCallStatus.Unknown, eCodecCallStatus.Ringing, call); } /// diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs index e21cfbba..6fb3d5b4 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs @@ -40,9 +40,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec /// public bool IsInCall { get { return ActiveCalls.Any(c => c.IsActiveCall); } } - public BoolFeedback IncomingCallFeedback { get; private set; } - - abstract protected Func IncomingCallFeedbackFunc { get; } abstract protected Func PrivacyModeIsOnFeedbackFunc { get; } abstract protected Func VolumeLevelFeedbackFunc { get; } abstract protected Func MuteFeedbackFunc { get; } @@ -52,12 +49,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec public VideoCodecInfo CodecInfo { get; protected set; } + public bool ShowSelfViewByDefault { get; protected set; } + + public bool AutoShareContentWhileInCall { get; protected set; } + public bool IsReady { get; protected set; } public VideoCodecBase(string key, string name) : base(key, name) { - IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc); PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeIsOnFeedbackFunc); VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc); MuteFeedback = new BoolFeedback(MuteFeedbackFunc); @@ -87,7 +87,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec { return new List { - IncomingCallFeedback, PrivacyModeIsOnFeedback, SharingSourceFeedback }; @@ -101,9 +100,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec /// protected void SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus newStatus, CodecActiveCallItem call) { - var prevStatus = call.Status; call.Status = newStatus; - OnCallStatusChange(prevStatus, newStatus, call); + + OnCallStatusChange(call); + + if (AutoShareContentWhileInCall) + StartSharing(); } /// @@ -112,11 +114,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec /// /// /// - protected void OnCallStatusChange(eCodecCallStatus previousStatus, eCodecCallStatus newStatus, CodecActiveCallItem item) + protected void OnCallStatusChange(CodecActiveCallItem item) { var handler = CallStatusChange; if (handler != null) - handler(this, new CodecCallStatusItemChangeEventArgs(previousStatus, newStatus, item)); + handler(this, new CodecCallStatusItemChangeEventArgs(item)); } /// @@ -174,31 +176,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec { var sb = new StringBuilder(); foreach (var c in ActiveCalls) - sb.AppendFormat("{0} {1} -- {2} {3}\r", c.Id, c.Number, c.Name, c.Status); - Debug.Console(1, "{0}", sb.ToString()); + sb.AppendFormat("{0} {1} -- {2} {3}\n", c.Id, c.Number, c.Name, c.Status); + Debug.Console(1, this, "\n{0}\n", sb.ToString()); } } - /// - /// - /// - public class CodecCallStatusItemChangeEventArgs : EventArgs - { - public CodecActiveCallItem CallItem { get; private set; } - - public eCodecCallStatus PreviousStatus { get; private set; } - - public eCodecCallStatus NewStatus { get; private set; } - - public CodecCallStatusItemChangeEventArgs(eCodecCallStatus previousStatus, - eCodecCallStatus newStatus, CodecActiveCallItem item) - { - PreviousStatus = previousStatus; - NewStatus = newStatus; - CallItem = item; - } - } /// /// Used to track the status of syncronizing the phonebook values when connecting to a codec or refreshing the phonebook info diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs index 376e2888..54b9f169 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs @@ -37,6 +37,15 @@ namespace PepperDash.Essentials /// 1003 - For tapping the text field to reveal the keyboard /// public const uint CodecDirectorySearchTextPress = 1003; + /// + /// 1004 + /// + public const uint CallStopSharingPress = 1004; + /// + /// 1005 + /// + public const uint CallSharedSourceInfoEnable = 1005; + // Audio Conference @@ -220,6 +229,7 @@ namespace PepperDash.Essentials /// public const uint VCSelfViewPipTogglePress = 1253; + //****************************************************** // Letter joins start at 2921; diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs index 2c7305dd..885868aa 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs @@ -1,51 +1,56 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; - -namespace PepperDash.Essentials -{ - /// - /// Common string join number constants - /// - public class UIStringJoin - { - //****************************************************** - // Codec - /// - /// 1001 - /// +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; + +namespace PepperDash.Essentials +{ + /// + /// Common string join number constants + /// + public class UIStringJoin + { + //****************************************************** + // Codec + /// + /// 1001 + /// public const uint CodecAddressEntryText = 1001; /// /// 1002 /// - public const uint CodecDirectorySearchEntryText = 1002; - - /// - /// 1201 - 1230 range of joins for recents list - /// - public const uint VCRecentListTextStart = 1201; - // RANGE IN USE - public const uint VCRecentListTextEnd = 1230; - /// - /// 1231 - 1261 range of joins for recent list time - /// + public const uint CodecDirectorySearchEntryText = 1002; + /// + /// 1004 + /// + public const uint CallSharedSourceNameText = 1004; + + + /// + /// 1201 - 1230 range of joins for recents list + /// + public const uint VCRecentListTextStart = 1201; + // RANGE IN USE + public const uint VCRecentListTextEnd = 1230; + /// + /// 1231 - 1261 range of joins for recent list time + /// public const uint VCRecentListTimeTextStart = 1231; // RANGE IN USE - public const uint VCRecentListTimeTextEnd = 1260; - /// - /// 1291 - the current layout mode - /// - public const uint VCLayoutModeText = 1291; - - /// - /// 1301 - 1400 - /// - public const uint VCDirectoryListTextStart = 1301; - // RANGE IN USE + public const uint VCRecentListTimeTextEnd = 1260; + /// + /// 1291 - the current layout mode + /// + public const uint VCLayoutModeText = 1291; + + /// + /// 1301 - 1400 + /// + public const uint VCDirectoryListTextStart = 1301; + // RANGE IN USE public const uint VCDirectoryListTextEnd = 1400; /// @@ -71,156 +76,156 @@ namespace PepperDash.Essentials /// /// 1415 /// - public const uint VCFavorites5Text = 1415; - - - //****************************************************** - // Keyboard - /// - /// 1901 - /// - //public const uint KeypadText = 2901; - - /// - /// 3101 - This is the start of the range 3101 - 3120 - /// - public const uint TechMenuButtonTextStart = 3101; - - //----- through 3120 - - - /// - /// 3812 - /// - public const uint AdvancedVolumeSlider1Text = 3812; - /// - /// 3822 - /// - public const uint AdvancedVolumeSlider2Text = 3822; - /// - /// 3832 - /// - public const uint AdvancedVolumeSlider3Text = 3832; - /// - /// 3842 - /// - public const uint AdvancedVolumeSlider4Text = 3842; - /// - /// 3852 - /// - public const uint AdvancedVolumeSlider5Text = 3852; - /// - /// 3862 - /// - public const uint AdvancedVolumeSlider6Text = 3862; - - /// - /// 3901 - /// - public const uint CurrentRoomName = 3901; - /// - /// 3902 - /// - public const uint CurrentSourceName = 3902; - /// - /// 3903 - /// - public const uint CurrentSourceIcon = 3903; - /// - /// 3904 - Phone number for room header - /// - public const uint RoomPhoneText = 3904; - /// - /// 3905 - SIP address for room header - /// - public const uint RoomSipText = 3905; - /// - /// 3906 - The separator for verbose-header text on addresses - /// - public const uint RoomAddressPipeText = 3906; - /// - /// 3911 - /// - public const uint PowerOffMessage = 3911; - /// - /// 3912 - /// - public const uint StartPageMessage = 3912; - /// - /// 3913 - /// - public const uint StartActivityText = 3913; - /// - /// 3914 Title bar label for source overlay - /// - public const uint SourceBackgroundOverlayTitle = 3914; - - /// - /// 3915 - /// - public const uint NotificationRibbonText = 3915; - /// - /// 3916 The "active call" label - /// - public const uint HeaderCallStatusLabel = 3916; - - /// - /// 3922 - /// - public const uint HelpMessage = 3922; - /// - /// 3923 - /// - public const uint LogoUrl = 3923; - /// - /// 3924 - the text on the "call help desk" button - /// - public const uint HelpPageCallButtonText = 3924; - - /// - /// 3961 Name of source on display 1 - /// - public const uint Display1SourceLabel = 3961; - /// - /// 3962 Title above display 1 - /// - public const uint Display1TitleLabel = 3962; - /// - /// 3964 Name of source on display 2 - /// - public const uint Display2SourceLabel = 3964; - /// - /// 3965 Title above display 2 - /// - public const uint Display2TitleLabel = 3965; - - /// - /// 3966 - /// - public const uint NextMeetingRibbonStartText = 3966; - /// - /// 3967 - /// - public const uint NextMeetingRibbonEndText = 3967; - /// - /// 3968 - /// - public const uint NextMeetingRibbonTitleText = 3968; - /// - /// 3969 - /// - public const uint NextMettingRibbonNameText = 3969; - /// - /// 3970 - /// - public const uint NextMeetingRibbonButtonLabel = 3970; - /// - /// 3971 - /// - public const uint NextMeetingSecondaryButtonLabel = 3971; - /// - /// 3972 - /// + public const uint VCFavorites5Text = 1415; + + + //****************************************************** + // Keyboard + /// + /// 1901 + /// + //public const uint KeypadText = 2901; + + /// + /// 3101 - This is the start of the range 3101 - 3120 + /// + public const uint TechMenuButtonTextStart = 3101; + + //----- through 3120 + + + /// + /// 3812 + /// + public const uint AdvancedVolumeSlider1Text = 3812; + /// + /// 3822 + /// + public const uint AdvancedVolumeSlider2Text = 3822; + /// + /// 3832 + /// + public const uint AdvancedVolumeSlider3Text = 3832; + /// + /// 3842 + /// + public const uint AdvancedVolumeSlider4Text = 3842; + /// + /// 3852 + /// + public const uint AdvancedVolumeSlider5Text = 3852; + /// + /// 3862 + /// + public const uint AdvancedVolumeSlider6Text = 3862; + + /// + /// 3901 + /// + public const uint CurrentRoomName = 3901; + /// + /// 3902 + /// + public const uint CurrentSourceName = 3902; + /// + /// 3903 + /// + public const uint CurrentSourceIcon = 3903; + /// + /// 3904 - Phone number for room header + /// + public const uint RoomPhoneText = 3904; + /// + /// 3905 - SIP address for room header + /// + public const uint RoomSipText = 3905; + /// + /// 3906 - The separator for verbose-header text on addresses + /// + public const uint RoomAddressPipeText = 3906; + /// + /// 3911 + /// + public const uint PowerOffMessage = 3911; + /// + /// 3912 + /// + public const uint StartPageMessage = 3912; + /// + /// 3913 + /// + public const uint StartActivityText = 3913; + /// + /// 3914 Title bar label for source overlay + /// + public const uint SourceBackgroundOverlayTitle = 3914; + + /// + /// 3915 + /// + public const uint NotificationRibbonText = 3915; + /// + /// 3916 The "active call" label + /// + public const uint HeaderCallStatusLabel = 3916; + + /// + /// 3922 + /// + public const uint HelpMessage = 3922; + /// + /// 3923 + /// + public const uint LogoUrl = 3923; + /// + /// 3924 - the text on the "call help desk" button + /// + public const uint HelpPageCallButtonText = 3924; + + /// + /// 3961 Name of source on display 1 + /// + public const uint Display1SourceLabel = 3961; + /// + /// 3962 Title above display 1 + /// + public const uint Display1TitleLabel = 3962; + /// + /// 3964 Name of source on display 2 + /// + public const uint Display2SourceLabel = 3964; + /// + /// 3965 Title above display 2 + /// + public const uint Display2TitleLabel = 3965; + + /// + /// 3966 + /// + public const uint NextMeetingRibbonStartText = 3966; + /// + /// 3967 + /// + public const uint NextMeetingRibbonEndText = 3967; + /// + /// 3968 + /// + public const uint NextMeetingRibbonTitleText = 3968; + /// + /// 3969 + /// + public const uint NextMettingRibbonNameText = 3969; + /// + /// 3970 + /// + public const uint NextMeetingRibbonButtonLabel = 3970; + /// + /// 3971 + /// + public const uint NextMeetingSecondaryButtonLabel = 3971; + /// + /// 3972 + /// public const uint NextMeetingFollowingMeetingText = 3972; /// @@ -231,7 +236,7 @@ namespace PepperDash.Essentials /// /// 3997 /// - public const uint MeetingsOrContactMethodListTitleText = 3997; - - } + public const uint MeetingsOrContactMethodListTitleText = 3997; + + } } \ No newline at end of file diff --git a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 506bd776..b2ee51cc 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -304,14 +304,27 @@ namespace PepperDash.Essentials (CurrentRoom.DefaultDisplay as IPower).PowerToggle(); }); - TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusButtonPress, () => - PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible)); + TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusButtonPress, ShowActiveCallsList ); SetupNextMeetingTimer(); base.Show(); } + /// + /// Allows PopupInterlock to be toggled if the calls list is already visible, or if the codec is in a call + /// + void ShowActiveCallsList() + { + if(PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible) + PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible); + else + { + if((CurrentRoom.ScheduleSource as VideoCodecBase).IsInCall) + PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible); + } + } + /// /// /// @@ -959,8 +972,7 @@ namespace PepperDash.Essentials // Call button HeaderCallButton = new HeaderListButton(HeaderButtonsList, nextIndex); HeaderCallButton.SetIcon(HeaderListButton.OnHook); - HeaderCallButton.OutputSig.SetSigFalseAction(() => - PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible)); + HeaderCallButton.OutputSig.SetSigFalseAction(ShowActiveCallsList); nextIndex--; diff --git a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index 69a3b4b0..c00d3ea3 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -79,6 +79,9 @@ namespace PepperDash.Essentials.UIDrivers.VC StringBuilder SearchStringBuilder = new StringBuilder(); BoolFeedback SearchStringBackspaceVisibleFeedback; + BoolFeedback CallSharingInfoVisibleFeedback; + StringFeedback CallSharingInfoTextFeedback; + ModalDialog IncomingCallModal; eKeypadMode KeypadMode; @@ -107,6 +110,8 @@ namespace PepperDash.Essentials.UIDrivers.VC codec.CallStatusChange += new EventHandler(Codec_CallStatusChange); + codec.SharingSourceFeedback.OutputChange += new EventHandler(SharingSourceFeedback_OutputChange); + // If the codec is ready, then get the values we want, otherwise wait if (Codec.IsReady) Codec_IsReady(); @@ -153,7 +158,7 @@ namespace PepperDash.Essentials.UIDrivers.VC else { Parent.Keyboard.DisableGoButton(); - return "Touch to Search"; + return "Tap For Search Keyboard"; } }); SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]); @@ -173,9 +178,46 @@ namespace PepperDash.Essentials.UIDrivers.VC TriList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackspacePress, SearchKeypadBackspacePress); + CallSharingInfoVisibleFeedback = new BoolFeedback(() => !string.IsNullOrEmpty(Codec.SharingSourceFeedback.StringValue)); + CallSharingInfoVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.CallSharedSourceInfoEnable]); + + CallSharingInfoTextFeedback = new StringFeedback(() => GetCurrentSourceName(Codec.SharingSourceFeedback.StringValue)); + CallSharingInfoTextFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CallSharedSourceNameText]); + + TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, Codec.StopSharing); + + + // Address and number } + /// + /// Returns the name of the source that matches the specified key + /// + /// + /// + string GetCurrentSourceName(string key) + { + var device = DeviceManager.GetDeviceForKey(key); + + return (device as SourceListItem).Name; + } + + /// + /// Fires when the sharing source feedback of the codec changes + /// + /// + /// + void SharingSourceFeedback_OutputChange(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty((sender as IHasSharing).SharingSourceFeedback.StringValue)) + { + // Source is being shared + + + } + } + /// /// /// @@ -197,7 +239,14 @@ namespace PepperDash.Essentials.UIDrivers.VC void Codec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e) { var call = e.CallItem; - switch (e.NewStatus) + + //var newStatus = e.NewStatus; + + //// Catch events with no status and reuse previous status if found + //if (newStatus == eCodecCallStatus.Unknown && e.PreviousStatus != eCodecCallStatus.Unknown) + // newStatus = e.PreviousStatus; + + switch (e.CallItem.Status) { case eCodecCallStatus.Connected: // fire at SRL item @@ -214,7 +263,7 @@ namespace PepperDash.Essentials.UIDrivers.VC Parent.ShowNotificationRibbon("Connecting", 0); break; case eCodecCallStatus.Dialing: - Parent.ShowNotificationRibbon("Dialing", 0); + Parent.ShowNotificationRibbon("Connecting", 0); break; case eCodecCallStatus.Disconnected: if (!Codec.IsInCall) @@ -255,14 +304,15 @@ namespace PepperDash.Essentials.UIDrivers.VC Parent.ComputeHeaderCallStatus(Codec); - // Update list of calls - UpdateCallsHeaderList(call); + // Update active call list + UpdateHeaderActiveCallList(); + } /// /// Redraws the calls list on the header /// - void UpdateCallsHeaderList(CodecActiveCallItem call) + void UpdateHeaderActiveCallList() { var activeList = Codec.ActiveCalls.Where(c => c.IsActiveCall).ToList(); ActiveCallsSRL.Clear(); @@ -279,6 +329,10 @@ namespace PepperDash.Essentials.UIDrivers.VC i++; } ActiveCallsSRL.Count = (ushort)activeList.Count; + + // If Active Calls list is visible and codec is not in a call, hide the list + if (!Codec.IsInCall && Parent.PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible) + Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible); } /// @@ -431,7 +485,7 @@ namespace PepperDash.Essentials.UIDrivers.VC else if (c.OccurenceType == eCodecOccurrenceType.Placed) iconName = "Misc-17_Light"; else - iconName = "Help"; + iconName = "Delete"; RecentCallsList.SetItemIcon(i, iconName); var call = c; // for lambda scope @@ -609,16 +663,25 @@ namespace PepperDash.Essentials.UIDrivers.VC var dc = r as DirectoryContact; - DirectoryList.SetItemButtonAction(i, b => + if (dc.ContactMethods.Count > 1) { - if (!b) + // If more than one contact method, show contact method modal dialog + DirectoryList.SetItemButtonAction(i, b => { - // Refresh the contact methods list - RefreshContactMethodsModalList(dc); - Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible); - } - }); + if (!b) + { + // Refresh the contact methods list + RefreshContactMethodsModalList(dc); + Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible); + } + }); + } + else + { + // If only one contact method, just dial that method + DirectoryList.SetItemButtonAction(i, b => Codec.Dial(dc.ContactMethods[0].Number)); + } } else // is DirectoryFolder { @@ -685,9 +748,6 @@ namespace PepperDash.Essentials.UIDrivers.VC var svc = Codec as IHasCodecSelfview; if (svc != null) { - // Default Selfview to off - svc.SelfviewModeOff(); - TriList.SetSigFalseAction(UIBoolJoin.VCSelfViewTogglePress, svc.SelfviewModeToggle); svc.SelfviewIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCSelfViewTogglePress]); @@ -964,7 +1024,7 @@ namespace PepperDash.Essentials.UIDrivers.VC { if (DialStringBuilder.Length == 0 && !Codec.IsInCall) { - return "Dial or touch to enter address"; + return "Dial or Tap to Show Keyboard"; } if(Regex.Match(ds, @"^\d{4,7}$").Success) // 456-7890 return string.Format("{0}-{1}", ds.Substring(0, 3), ds.Substring(3)); @@ -985,7 +1045,8 @@ namespace PepperDash.Essentials.UIDrivers.VC enum eKeypadMode { - Dial, DTMF + Dial = 0, + DTMF } } } \ No newline at end of file