mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-29 04:15:00 +00:00
Added starter method for directory root:good; adding json props and converters to directory classes
This commit is contained in:
@@ -90,6 +90,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||
if (call != null)
|
||||
Codec.AcceptCall(call);
|
||||
}));
|
||||
appServerController.AddAction(MessagePath + "/directoryRoot", new Action(GetDirectoryRoot));
|
||||
appServerController.AddAction(MessagePath + "/privacyModeOn", new Action(Codec.PrivacyModeOn));
|
||||
appServerController.AddAction(MessagePath + "/privacyModeOff", new Action(Codec.PrivacyModeOff));
|
||||
appServerController.AddAction(MessagePath + "/privacyModeToggle", new Action(Codec.PrivacyModeToggle));
|
||||
@@ -114,6 +115,37 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||
return Codec.ActiveCalls.FirstOrDefault(c => c.Id == id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void GetDirectoryRoot()
|
||||
{
|
||||
var dirCodec = Codec as IHasDirectory;
|
||||
if (dirCodec == null)
|
||||
{
|
||||
// do something else?
|
||||
return;
|
||||
}
|
||||
if (!dirCodec.PhonebookSyncState.InitialSyncComplete)
|
||||
{
|
||||
PostStatusMessage(new
|
||||
{
|
||||
initialSyncComplete = false
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var dir = dirCodec.DirectoryRoot;
|
||||
PostStatusMessage(new
|
||||
{
|
||||
directory = new
|
||||
{
|
||||
folderId = dir.ResultsFolderId,
|
||||
directory = dir.DirectoryResults
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handler for codec changes
|
||||
/// </summary>
|
||||
@@ -122,6 +154,9 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||
SendVtcFullMessageObject();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void SendIsReady()
|
||||
{
|
||||
PostStatusMessage(new
|
||||
@@ -159,7 +194,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||
sipPhoneNumber = info.SipPhoneNumber,
|
||||
sipURI = info.SipUri
|
||||
},
|
||||
showSelfViewByDefault = Codec.ShowSelfViewByDefault
|
||||
showSelfViewByDefault = Codec.ShowSelfViewByDefault,
|
||||
hasDirectory = Codec is IHasDirectory
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ namespace PepperDash.Essentials
|
||||
|
||||
var routeRoom = Room as IRunRouteAction;
|
||||
if(routeRoom != null)
|
||||
Parent.AddAction(string.Format(@"/room/{0}/source", Room.Key), new Action<SourceSelectMessageContent>(c => routeRoom.RunRouteAction(c.SourceListItem)));
|
||||
Parent.AddAction(string.Format(@"/room/{0}/source", Room.Key), new Action<SourceSelectMessageContent>(c =>
|
||||
routeRoom.RunRouteAction(c.SourceListItem)));
|
||||
|
||||
var defaultRoom = Room as IRunDefaultPresentRoute;
|
||||
if(defaultRoom != null)
|
||||
|
||||
@@ -15,6 +15,11 @@ namespace PepperDash.Essentials.Room.Cotija
|
||||
|
||||
[JsonProperty("auxFaders")]
|
||||
public List<Volume> AuxFaders { get; set; }
|
||||
|
||||
public Volumes()
|
||||
{
|
||||
AuxFaders = new List<Volume>();
|
||||
}
|
||||
}
|
||||
|
||||
public class Volume
|
||||
|
||||
@@ -537,25 +537,22 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
var codec = Codec as IHasDirectory;
|
||||
if (codec != null)
|
||||
{
|
||||
if (codec != null)
|
||||
DirectoryList = new SmartObjectDynamicList(TriList.SmartObjects[UISmartObjectJoin.VCDirectoryList],
|
||||
true, 1300);
|
||||
codec.DirectoryResultReturned += new EventHandler<DirectoryEventArgs>(dir_DirectoryResultReturned);
|
||||
|
||||
if (codec.PhonebookSyncState.InitialSyncComplete)
|
||||
SetCurrentDirectoryToRoot();
|
||||
else
|
||||
{
|
||||
DirectoryList = new SmartObjectDynamicList(TriList.SmartObjects[UISmartObjectJoin.VCDirectoryList],
|
||||
true, 1300);
|
||||
codec.DirectoryResultReturned += new EventHandler<DirectoryEventArgs>(dir_DirectoryResultReturned);
|
||||
|
||||
if (codec.PhonebookSyncState.InitialSyncComplete)
|
||||
SetCurrentDirectoryToRoot();
|
||||
else
|
||||
{
|
||||
codec.PhonebookSyncState.InitialSyncCompleted += new EventHandler<EventArgs>(PhonebookSyncState_InitialSyncCompleted);
|
||||
}
|
||||
codec.PhonebookSyncState.InitialSyncCompleted += new EventHandler<EventArgs>(PhonebookSyncState_InitialSyncCompleted);
|
||||
}
|
||||
|
||||
|
||||
// If there is something here now, show it otherwise wait for the event
|
||||
if (CurrentDirectoryResult != null && codec.DirectoryRoot.DirectoryResults.Count > 0)
|
||||
{
|
||||
RefreshDirectory();
|
||||
}
|
||||
// If there is something here now, show it otherwise wait for the event
|
||||
if (CurrentDirectoryResult != null && codec.DirectoryRoot.DirectoryResults.Count > 0)
|
||||
{
|
||||
RefreshDirectory();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user