mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 04:34:56 +00:00
Working on moving codec browsing data from UI into codec class
This commit is contained in:
@@ -122,10 +122,23 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
if (call != null)
|
if (call != null)
|
||||||
Codec.AcceptCall(call);
|
Codec.AcceptCall(call);
|
||||||
}));
|
}));
|
||||||
appServerController.AddAction(MessagePath + "/getDirectory", new Action(GetDirectoryRoot));
|
|
||||||
appServerController.AddAction(MessagePath + "/directoryById", new Action<string>(s => GetDirectory(s)));
|
// Directory actions
|
||||||
appServerController.AddAction(MessagePath + "/directorySearch", new Action<string>(s => DirectorySearch(s)));
|
var dirCodec = Codec as IHasDirectory;
|
||||||
appServerController.AddAction(MessagePath + "/getCallHistory", new Action(GetCallHistory));
|
if (dirCodec != null)
|
||||||
|
{
|
||||||
|
appServerController.AddAction(MessagePath + "/getDirectory", new Action(GetDirectoryRoot));
|
||||||
|
appServerController.AddAction(MessagePath + "/directoryById", new Action<string>(s => GetDirectory(s)));
|
||||||
|
appServerController.AddAction(MessagePath + "/directorySearch", new Action<string>(s => DirectorySearch(s)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// History actions
|
||||||
|
var recCodec = Codec as IHasCallHistory;
|
||||||
|
if (recCodec != null)
|
||||||
|
{
|
||||||
|
appServerController.AddAction(MessagePath + "/getCallHistory", new Action(GetCallHistory));
|
||||||
|
}
|
||||||
|
|
||||||
appServerController.AddAction(MessagePath + "/privacyModeOn", new Action(Codec.PrivacyModeOn));
|
appServerController.AddAction(MessagePath + "/privacyModeOn", new Action(Codec.PrivacyModeOn));
|
||||||
appServerController.AddAction(MessagePath + "/privacyModeOff", new Action(Codec.PrivacyModeOff));
|
appServerController.AddAction(MessagePath + "/privacyModeOff", new Action(Codec.PrivacyModeOff));
|
||||||
appServerController.AddAction(MessagePath + "/privacyModeToggle", new Action(Codec.PrivacyModeToggle));
|
appServerController.AddAction(MessagePath + "/privacyModeToggle", new Action(Codec.PrivacyModeToggle));
|
||||||
|
|||||||
@@ -61,10 +61,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
|
|
||||||
CodecDirectory CurrentDirectoryResult;
|
CodecDirectory CurrentDirectoryResult;
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// Tracks the directory browse history when browsing beyond the root directory
|
///// Tracks the directory browse history when browsing beyond the root directory
|
||||||
/// </summary>
|
///// </summary>
|
||||||
List<CodecDirectory> DirectoryBrowseHistory;
|
//List<CodecDirectory> DirectoryBrowseHistory;
|
||||||
|
|
||||||
bool NextDirectoryResultIsFolderContents;
|
bool NextDirectoryResultIsFolderContents;
|
||||||
|
|
||||||
@@ -532,8 +532,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void SetupDirectoryList()
|
void SetupDirectoryList()
|
||||||
{
|
{
|
||||||
DirectoryBrowseHistory = new List<CodecDirectory>();
|
|
||||||
|
|
||||||
var codec = Codec as IHasDirectory;
|
var codec = Codec as IHasDirectory;
|
||||||
if (codec != null)
|
if (codec != null)
|
||||||
{
|
{
|
||||||
@@ -558,12 +556,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the current directory resutls to the DirectorRoot and updates Back Button visibiltiy
|
/// Sets the current directory results to the DirectoryRoot and updates Back Button visibiltiy
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void SetCurrentDirectoryToRoot()
|
void SetCurrentDirectoryToRoot()
|
||||||
{
|
{
|
||||||
DirectoryBrowseHistory.Clear();
|
|
||||||
|
|
||||||
CurrentDirectoryResult = (Codec as IHasDirectory).DirectoryRoot;
|
CurrentDirectoryResult = (Codec as IHasDirectory).DirectoryRoot;
|
||||||
|
|
||||||
SearchKeypadClear();
|
SearchKeypadClear();
|
||||||
@@ -600,7 +596,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
if (NextDirectoryResultIsFolderContents)
|
if (NextDirectoryResultIsFolderContents)
|
||||||
{
|
{
|
||||||
NextDirectoryResultIsFolderContents = false;
|
NextDirectoryResultIsFolderContents = false;
|
||||||
DirectoryBrowseHistory.Add(e.Directory);
|
|
||||||
}
|
}
|
||||||
CurrentDirectoryResult = e.Directory;
|
CurrentDirectoryResult = e.Directory;
|
||||||
DirectoryBackButtonVisibleFeedback.FireUpdate();
|
DirectoryBackButtonVisibleFeedback.FireUpdate();
|
||||||
@@ -625,18 +620,13 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
{
|
{
|
||||||
var codec = Codec as IHasDirectory;
|
var codec = Codec as IHasDirectory;
|
||||||
|
|
||||||
if (DirectoryBrowseHistory.Count > 0)
|
if (codec != null)
|
||||||
{
|
{
|
||||||
var lastItemIndex = DirectoryBrowseHistory.Count - 1;
|
CurrentDirectoryResult = codec.GetDirectoryParentFolderContents();
|
||||||
CurrentDirectoryResult = DirectoryBrowseHistory[lastItemIndex];
|
|
||||||
DirectoryBrowseHistory.Remove(DirectoryBrowseHistory[lastItemIndex]);
|
|
||||||
|
|
||||||
RefreshDirectory();
|
RefreshDirectory();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
SetCurrentDirectoryToRoot();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -725,13 +715,13 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
Parent.MeetingOrContactMethodModalSrl.StringInputSig(i, 4).StringValue = "";
|
Parent.MeetingOrContactMethodModalSrl.StringInputSig(i, 4).StringValue = "";
|
||||||
Parent.MeetingOrContactMethodModalSrl.StringInputSig(i, 5).StringValue = "Connect";
|
Parent.MeetingOrContactMethodModalSrl.StringInputSig(i, 5).StringValue = "Connect";
|
||||||
Parent.MeetingOrContactMethodModalSrl.BoolInputSig(i, 2).BoolValue = true;
|
Parent.MeetingOrContactMethodModalSrl.BoolInputSig(i, 2).BoolValue = true;
|
||||||
var cc = c; // lambda scope
|
var cc = c; // to maintian lambda scope
|
||||||
Parent.MeetingOrContactMethodModalSrl.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() =>
|
Parent.MeetingOrContactMethodModalSrl.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() =>
|
||||||
{
|
{
|
||||||
Parent.PopupInterlock.Hide();
|
Parent.PopupInterlock.Hide();
|
||||||
var codec = Codec as VideoCodecBase;
|
var codec = Codec as VideoCodecBase;
|
||||||
if (codec != null)
|
if (codec != null)
|
||||||
codec.Dial(c.Number);
|
codec.Dial(cc.Number);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Parent.MeetingOrContactMethodModalSrl.Count = i;
|
Parent.MeetingOrContactMethodModalSrl.Count = i;
|
||||||
|
|||||||
Submodule essentials-framework updated: c40f3b40d5...d869bc92ce
Reference in New Issue
Block a user