mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 04:34:56 +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)
|
if (call != null)
|
||||||
Codec.AcceptCall(call);
|
Codec.AcceptCall(call);
|
||||||
}));
|
}));
|
||||||
|
appServerController.AddAction(MessagePath + "/directoryRoot", new Action(GetDirectoryRoot));
|
||||||
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));
|
||||||
@@ -114,6 +115,37 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
return Codec.ActiveCalls.FirstOrDefault(c => c.Id == id);
|
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>
|
/// <summary>
|
||||||
/// Handler for codec changes
|
/// Handler for codec changes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -122,6 +154,9 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
SendVtcFullMessageObject();
|
SendVtcFullMessageObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
void SendIsReady()
|
void SendIsReady()
|
||||||
{
|
{
|
||||||
PostStatusMessage(new
|
PostStatusMessage(new
|
||||||
@@ -159,7 +194,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
sipPhoneNumber = info.SipPhoneNumber,
|
sipPhoneNumber = info.SipPhoneNumber,
|
||||||
sipURI = info.SipUri
|
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;
|
var routeRoom = Room as IRunRouteAction;
|
||||||
if(routeRoom != null)
|
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;
|
var defaultRoom = Room as IRunDefaultPresentRoute;
|
||||||
if(defaultRoom != null)
|
if(defaultRoom != null)
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
|
|
||||||
[JsonProperty("auxFaders")]
|
[JsonProperty("auxFaders")]
|
||||||
public List<Volume> AuxFaders { get; set; }
|
public List<Volume> AuxFaders { get; set; }
|
||||||
|
|
||||||
|
public Volumes()
|
||||||
|
{
|
||||||
|
AuxFaders = new List<Volume>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Volume
|
public class Volume
|
||||||
|
|||||||
@@ -537,25 +537,22 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
var codec = Codec as IHasDirectory;
|
var codec = Codec as IHasDirectory;
|
||||||
if (codec != null)
|
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],
|
codec.PhonebookSyncState.InitialSyncCompleted += new EventHandler<EventArgs>(PhonebookSyncState_InitialSyncCompleted);
|
||||||
true, 1300);
|
}
|
||||||
codec.DirectoryResultReturned += new EventHandler<DirectoryEventArgs>(dir_DirectoryResultReturned);
|
|
||||||
|
|
||||||
if (codec.PhonebookSyncState.InitialSyncComplete)
|
|
||||||
SetCurrentDirectoryToRoot();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
codec.PhonebookSyncState.InitialSyncCompleted += new EventHandler<EventArgs>(PhonebookSyncState_InitialSyncCompleted);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// If there is something here now, show it otherwise wait for the event
|
// If there is something here now, show it otherwise wait for the event
|
||||||
if (CurrentDirectoryResult != null && codec.DirectoryRoot.DirectoryResults.Count > 0)
|
if (CurrentDirectoryResult != null && codec.DirectoryRoot.DirectoryResults.Count > 0)
|
||||||
{
|
{
|
||||||
RefreshDirectory();
|
RefreshDirectory();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user