diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ICustomMobileControl.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ICustomMobileControl.cs
new file mode 100644
index 00000000..3ae19216
--- /dev/null
+++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ICustomMobileControl.cs
@@ -0,0 +1,11 @@
+using PepperDash.Core;
+
+namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
+{
+ ///
+ /// Use this interface on a device or room if it uses custom Mobile Control messengers
+ ///
+ public interface ICustomMobileControl : IKeyed
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs
index 09420b7e..0b1760fa 100644
--- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs
+++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs
@@ -1,155 +1,72 @@
using System;
-using System.Collections.ObjectModel;
-using Crestron.SimplSharpPro;
-using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core;
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
{
- ///
- /// Use this interface on a device or room if it uses custom Mobile Control messengers
- ///
- public interface ICustomMobileControl : IKeyed
- {
- }
-
- /*///
- /// Describes a MobileControlSystemController
- ///
- public interface IMobileControl : IKeyed
- {
- void CreateMobileControlRoomBridge(IEssentialsRoom room, IMobileControl parent);
-
- void LinkSystemMonitorToAppServer();
- }*/
///
/// Defines the contract for IMobileControl
///
public interface IMobileControl : IKeyed
{
+ ///
+ /// Gets the Host
+ ///
string Host { get; }
+ ///
+ /// Gets the Client App URL
+ ///
string ClientAppUrl { get; }
+ ///
+ /// Gets the System UUID
+ ///
string SystemUuid { get; }
+ ///
+ /// Gets the ApiOnlineAndAuthorized feedback
+ ///
BoolFeedback ApiOnlineAndAuthorized { get; }
+ ///
+ /// Sends the message object to the AppServer
+ ///
+ /// Message to send
void SendMessageObject(IMobileControlMessage o);
+ ///
+ /// Adds an action for a messenger
+ ///
+ /// Messenger type. Must implement IMobileControlMessenger
+ /// messenger to register
+ /// action to add
void AddAction(T messenger, Action action) where T : IMobileControlMessenger;
+ ///
+ /// Removes an action for a messenger
+ ///
+ /// key for action
void RemoveAction(string key);
+ ///
+ /// Adds a device messenger
+ ///
+ /// Messenger to add
void AddDeviceMessenger(IMobileControlMessenger messenger);
+ ///
+ /// Check if a device messenger exists
+ ///
+ /// Messenger key to find
bool CheckForDeviceMessenger(string key);
+ ///
+ /// Get a Room Messenger by key
+ ///
+ /// messenger key to find
+ /// Messenger if found, null otherwise
IMobileControlRoomMessenger GetRoomMessenger(string key);
-
- }
-
- ///
- /// Defines the contract for IMobileControlMessenger
- ///
- public interface IMobileControlMessenger : IKeyed
- {
- IMobileControl AppServerController { get; }
- string MessagePath { get; }
-
- string DeviceKey { get; }
- void RegisterWithAppServer(IMobileControl appServerController);
- }
-
- public interface IMobileControlMessage
- {
- [JsonProperty("type")]
- string Type { get; }
-
- [JsonProperty("clientId", NullValueHandling = NullValueHandling.Ignore)]
- string ClientId { get; }
-
- [JsonProperty("content", NullValueHandling = NullValueHandling.Ignore)]
- JToken Content { get; }
-
- }
-
- ///
- /// Defines the contract for IMobileControlRoomMessenger
- ///
- public interface IMobileControlRoomMessenger : IKeyed
- {
- event EventHandler UserCodeChanged;
-
- event EventHandler UserPromptedForCode;
-
- event EventHandler ClientJoined;
-
- event EventHandler AppUrlChanged;
-
- string UserCode { get; }
-
- string QrCodeUrl { get; }
-
- string QrCodeChecksum { get; }
-
- string McServerUrl { get; }
-
- string RoomName { get; }
-
- string AppUrl { get; }
-
- void UpdateAppUrl(string url);
- }
-
- ///
- /// Defines the contract for IMobileControlAction
- ///
- public interface IMobileControlAction
- {
- IMobileControlMessenger Messenger { get; }
-
- Action Action { get; }
- }
-
- ///
- /// Defines the contract for IMobileControlTouchpanelController
- ///
- public interface IMobileControlTouchpanelController : IKeyed
- {
- ///
- /// The default room key for the controller
- ///
- string DefaultRoomKey { get; }
-
- ///
- /// Sets the application URL for the controller
- ///
- /// The application URL
- void SetAppUrl(string url);
-
- ///
- /// Indicates whether the controller uses a direct server connection
- ///
- bool UseDirectServer { get; }
-
- ///
- /// Indicates whether the controller is a Zoom Room controller
- ///
- bool ZoomRoomController { get; }
- }
-
- ///
- /// Describes a MobileControl Crestron Touchpanel Controller
- /// This interface extends the IMobileControlTouchpanelController to include connected IP information
- ///
- public interface IMobileControlCrestronTouchpanelController : IMobileControlTouchpanelController
- {
- ///
- /// Gets a collection of connected IP information for the touchpanel controller
- ///
- ReadOnlyCollection ConnectedIps { get; }
}
}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlAction.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlAction.cs
new file mode 100644
index 00000000..982deaae
--- /dev/null
+++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlAction.cs
@@ -0,0 +1,15 @@
+using System;
+using Newtonsoft.Json.Linq;
+
+namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
+{
+ ///
+ /// Defines the contract for IMobileControlAction
+ ///
+ public interface IMobileControlAction
+ {
+ IMobileControlMessenger Messenger { get; }
+
+ Action Action { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlCrestronTouchpanelController.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlCrestronTouchpanelController.cs
new file mode 100644
index 00000000..9878fcbd
--- /dev/null
+++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlCrestronTouchpanelController.cs
@@ -0,0 +1,17 @@
+using System.Collections.ObjectModel;
+using Crestron.SimplSharpPro;
+
+namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
+{
+ ///
+ /// Describes a MobileControl Crestron Touchpanel Controller
+ /// This interface extends the IMobileControlTouchpanelController to include connected IP information
+ ///
+ public interface IMobileControlCrestronTouchpanelController : IMobileControlTouchpanelController
+ {
+ ///
+ /// Gets a collection of connected IP information for the touchpanel controller
+ ///
+ ReadOnlyCollection ConnectedIps { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlMessage.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlMessage.cs
new file mode 100644
index 00000000..41645da2
--- /dev/null
+++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlMessage.cs
@@ -0,0 +1,18 @@
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
+{
+ public interface IMobileControlMessage
+ {
+ [JsonProperty("type")]
+ string Type { get; }
+
+ [JsonProperty("clientId", NullValueHandling = NullValueHandling.Ignore)]
+ string ClientId { get; }
+
+ [JsonProperty("content", NullValueHandling = NullValueHandling.Ignore)]
+ JToken Content { get; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlMessenger.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlMessenger.cs
new file mode 100644
index 00000000..178289e4
--- /dev/null
+++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlMessenger.cs
@@ -0,0 +1,31 @@
+using PepperDash.Core;
+
+namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
+{
+ ///
+ /// Defines the contract for IMobileControlMessenger
+ ///
+ public interface IMobileControlMessenger : IKeyed
+ {
+ ///
+ /// Parent controller for this messenger
+ ///
+ IMobileControl AppServerController { get; }
+
+ ///
+ /// Path to listen for messages
+ ///
+ string MessagePath { get; }
+
+ ///
+ /// Key of the device this messenger is associated with
+ ///
+ string DeviceKey { get; }
+
+ ///
+ /// Register this messenger with the AppServerController
+ ///
+ ///
+ void RegisterWithAppServer(IMobileControl appServerController);
+ }
+}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlRoomMessenger.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlRoomMessenger.cs
new file mode 100644
index 00000000..6f4d9a17
--- /dev/null
+++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlRoomMessenger.cs
@@ -0,0 +1,33 @@
+using System;
+using PepperDash.Core;
+
+namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
+{
+ ///
+ /// Defines the contract for IMobileControlRoomMessenger
+ ///
+ public interface IMobileControlRoomMessenger : IKeyed
+ {
+ event EventHandler UserCodeChanged;
+
+ event EventHandler UserPromptedForCode;
+
+ event EventHandler ClientJoined;
+
+ event EventHandler AppUrlChanged;
+
+ string UserCode { get; }
+
+ string QrCodeUrl { get; }
+
+ string QrCodeChecksum { get; }
+
+ string McServerUrl { get; }
+
+ string RoomName { get; }
+
+ string AppUrl { get; }
+
+ void UpdateAppUrl(string url);
+ }
+}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlTouchpanelController.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlTouchpanelController.cs
new file mode 100644
index 00000000..e0d5f05d
--- /dev/null
+++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlTouchpanelController.cs
@@ -0,0 +1,31 @@
+using PepperDash.Core;
+
+namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
+{
+ ///
+ /// Defines the contract for IMobileControlTouchpanelController
+ ///
+ public interface IMobileControlTouchpanelController : IKeyed
+ {
+ ///
+ /// The default room key for the controller
+ ///
+ string DefaultRoomKey { get; }
+
+ ///
+ /// Sets the application URL for the controller
+ ///
+ /// The application URL
+ void SetAppUrl(string url);
+
+ ///
+ /// Indicates whether the controller uses a direct server connection
+ ///
+ bool UseDirectServer { get; }
+
+ ///
+ /// Indicates whether the controller is a Zoom Room controller
+ ///
+ bool ZoomRoomController { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceEventMessageBase.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceEventMessageBase.cs
new file mode 100644
index 00000000..0960758c
--- /dev/null
+++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceEventMessageBase.cs
@@ -0,0 +1,17 @@
+using Newtonsoft.Json;
+
+namespace PepperDash.Essentials.AppServer.Messengers
+{
+ ///
+ /// Base class for event messages that include the type of message and an event type
+ ///
+ public abstract class DeviceEventMessageBase : DeviceMessageBase
+ {
+ ///
+ /// The event type
+ ///
+ [JsonProperty("eventType")]
+ public string EventType { get; set; }
+ }
+
+}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceMessageBase.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceMessageBase.cs
new file mode 100644
index 00000000..54a6ec36
--- /dev/null
+++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceMessageBase.cs
@@ -0,0 +1,39 @@
+using Newtonsoft.Json;
+
+namespace PepperDash.Essentials.AppServer.Messengers
+{
+ ///
+ /// Base class for device messages that include the type of message
+ ///
+ public abstract class DeviceMessageBase
+ {
+ ///
+ /// The device key
+ ///
+ [JsonProperty("key")]
+ ///
+ /// Gets or sets the Key
+ ///
+ public string Key { get; set; }
+
+ ///
+ /// The device name
+ ///
+ [JsonProperty("name")]
+ public string Name { get; set; }
+
+ ///
+ /// The type of the message class
+ ///
+ [JsonProperty("messageType")]
+ public string MessageType => GetType().Name;
+
+ ///
+ /// Gets or sets the MessageBasePath
+ ///
+ [JsonProperty("messageBasePath")]
+
+ public string MessageBasePath { get; set; }
+ }
+
+}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceStateMessageBase.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceStateMessageBase.cs
new file mode 100644
index 00000000..87f19e3f
--- /dev/null
+++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceStateMessageBase.cs
@@ -0,0 +1,27 @@
+using System.Collections.Generic;
+using Newtonsoft.Json;
+
+namespace PepperDash.Essentials.AppServer.Messengers
+{
+ ///
+ /// Represents a DeviceStateMessageBase
+ ///
+ public class DeviceStateMessageBase : DeviceMessageBase
+ {
+ ///
+ /// The interfaces implmented by the device sending the messsage
+ ///
+ [JsonProperty("interfaces")]
+ public List Interfaces { get; private set; }
+
+ ///
+ /// Sets the interfaces implemented by the device sending the message
+ ///
+ ///
+ public void SetInterfaces(List interfaces)
+ {
+ Interfaces = interfaces;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs
index 4d96cf81..9ed9029b 100644
--- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs
+++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs
@@ -287,72 +287,4 @@ namespace PepperDash.Essentials.AppServer.Messengers
}
}
-
- ///
- /// Base class for device messages that include the type of message
- ///
- public abstract class DeviceMessageBase
- {
- ///
- /// The device key
- ///
- [JsonProperty("key")]
- ///
- /// Gets or sets the Key
- ///
- public string Key { get; set; }
-
- ///
- /// The device name
- ///
- [JsonProperty("name")]
- public string Name { get; set; }
-
- ///
- /// The type of the message class
- ///
- [JsonProperty("messageType")]
- public string MessageType => GetType().Name;
-
- ///
- /// Gets or sets the MessageBasePath
- ///
- [JsonProperty("messageBasePath")]
-
- public string MessageBasePath { get; set; }
- }
-
- ///
- /// Represents a DeviceStateMessageBase
- ///
- public class DeviceStateMessageBase : DeviceMessageBase
- {
- ///
- /// The interfaces implmented by the device sending the messsage
- ///
- [JsonProperty("interfaces")]
- public List Interfaces { get; private set; }
-
- ///
- /// Sets the interfaces implemented by the device sending the message
- ///
- ///
- public void SetInterfaces(List interfaces)
- {
- Interfaces = interfaces;
- }
- }
-
- ///
- /// Base class for event messages that include the type of message and an event type
- ///
- public abstract class DeviceEventMessageBase : DeviceMessageBase
- {
- ///
- /// The event type
- ///
- [JsonProperty("eventType")]
- public string EventType { get; set; }
- }
-
-}
\ No newline at end of file
+}
diff --git a/src/PepperDash.Essentials.MobileControl/ClientSpecificUpdateRequest.cs b/src/PepperDash.Essentials.MobileControl/ClientSpecificUpdateRequest.cs
new file mode 100644
index 00000000..beddd2f6
--- /dev/null
+++ b/src/PepperDash.Essentials.MobileControl/ClientSpecificUpdateRequest.cs
@@ -0,0 +1,20 @@
+using System;
+
+namespace PepperDash.Essentials
+{
+ ///
+ /// Represents a ClientSpecificUpdateRequest
+ ///
+ public class ClientSpecificUpdateRequest
+ {
+ public ClientSpecificUpdateRequest(Action action)
+ {
+ ResponseMethod = action;
+ }
+
+ ///
+ /// Gets or sets the ResponseMethod
+ ///
+ public Action ResponseMethod { get; private set; }
+ }
+}
diff --git a/src/PepperDash.Essentials.MobileControl/Interfaces.cs b/src/PepperDash.Essentials.MobileControl/IDelayedConfiguration.cs
similarity index 100%
rename from src/PepperDash.Essentials.MobileControl/Interfaces.cs
rename to src/PepperDash.Essentials.MobileControl/IDelayedConfiguration.cs
diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs b/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs
index 640cbecf..736bf69c 100644
--- a/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs
+++ b/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs
@@ -2420,33 +2420,4 @@ namespace PepperDash.Essentials
CrestronConsole.ConsoleCommandResponse("Usage: mobilehttprequest:N get/post url\r");
}
}
-
- ///
- /// Represents a ClientSpecificUpdateRequest
- ///
- public class ClientSpecificUpdateRequest
- {
- public ClientSpecificUpdateRequest(Action action)
- {
- ResponseMethod = action;
- }
-
- ///
- /// Gets or sets the ResponseMethod
- ///
- public Action ResponseMethod { get; private set; }
- }
-
- ///
- /// Represents a UserCodeChanged
- ///
- public class UserCodeChanged
- {
- public Action UpdateUserCode { get; private set; }
-
- public UserCodeChanged(Action updateMethod)
- {
- UpdateUserCode = updateMethod;
- }
- }
}
diff --git a/src/PepperDash.Essentials.MobileControl/UserCodeChanged.cs b/src/PepperDash.Essentials.MobileControl/UserCodeChanged.cs
new file mode 100644
index 00000000..ab899167
--- /dev/null
+++ b/src/PepperDash.Essentials.MobileControl/UserCodeChanged.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace PepperDash.Essentials
+{
+ ///
+ /// Represents a UserCodeChanged
+ ///
+ public class UserCodeChanged
+ {
+ public Action UpdateUserCode { get; private set; }
+
+ public UserCodeChanged(Action updateMethod)
+ {
+ UpdateUserCode = updateMethod;
+ }
+ }
+}