diff --git a/definitions/Definitions.vcxproj b/definitions/Definitions.vcxproj
index 4fff291e..48f66b4b 100644
--- a/definitions/Definitions.vcxproj
+++ b/definitions/Definitions.vcxproj
@@ -206,6 +206,20 @@
$(ProjectDir)../interfaces/json/JIOConnector.h
$(ProjectDir)../interfaces/json/JIOConnector.h
+
+ ClInclude
+ ClInclude
+ ClInclude
+ ClInclude
+ python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force
+ python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force
+ python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force
+ python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force
+ $(ProjectDir)../interfaces/json/JInputSwitch.h
+ $(ProjectDir)../interfaces/json/JInputSwitch.h
+ $(ProjectDir)../interfaces/json/JInputSwitch.h
+ $(ProjectDir)../interfaces/json/JInputSwitch.h
+
ClInclude
ClInclude
@@ -396,9 +410,6 @@
Document
-
- Document
-
Document
diff --git a/definitions/Definitions.vcxproj.filters b/definitions/Definitions.vcxproj.filters
index 88e26df6..af231236 100644
--- a/definitions/Definitions.vcxproj.filters
+++ b/definitions/Definitions.vcxproj.filters
@@ -212,9 +212,6 @@
JSON Files
-
- JSON Files
-
JSON Files
@@ -252,6 +249,11 @@
Interface Files
+ Interface Files
+
+
+ Interface Files
+
Interface Files
diff --git a/interfaces/IInputSwitch.h b/interfaces/IInputSwitch.h
index e9aa3e91..a47f1c8d 100644
--- a/interfaces/IInputSwitch.h
+++ b/interfaces/IInputSwitch.h
@@ -18,12 +18,17 @@
*/
#pragma once
+
#include "Module.h"
+// @insert
+
namespace Thunder {
+
namespace Exchange {
// This interface gives direct access to a time synchronize / update
+ // @json 1.0.0 @text:legacy_lowercase
struct EXTERNAL IInputSwitch : virtual public Core::IUnknown {
enum { ID = ID_INPUT_SWITCH };
@@ -33,12 +38,39 @@ namespace Exchange {
SLAVE
};
+ struct ChannelData {
+ string name /* @brief Callsign associated with this channel (e.g. WebKitBrowser) */;
+ bool enabled /* @brief Is the channel enabled to receive info (e.g. true) */;
+ };
+
+ typedef RPC::IIteratorType IChannelIterator;
+
+ // @json:omit
virtual RPC::IStringIterator* Consumers() const = 0;
+ // @json:omit
virtual bool Consumer(const string& name) const = 0;
+ // @json:omit
virtual uint32_t Consumer(const string& name, const mode value) = 0;
- virtual uint32_t Select(const string& name) = 0;
+ // @brief Enable the given channel, disabling all other not immune channels
+ // @param name: Callsign that is the owner of this channel (e.g. WebKitBrowser)
+ // @retval ERROR_UNKNOWN_KEY: Failed to find a channel with the given name
+ virtual Core::hresult Select(const string& name) = 0;
+
+ // @brief Enable or Disable the throughput through the given channel
+ // @param name: Callsign that is the owner of this channel (e.g. WebKitBrowser)
+ // @param enabled: Enable or disable the throughput of data through this channel (e.g. true)
+ // @retval ERROR_UNKNOWN_KEY: Failed to find a channel with the given name
+ virtual Core::hresult Channel(const string& name, const bool enabled) = 0;
+
+ // @property
+ // @brief Check the status of the requested channel
+ // @param name: Server name, if omitted, status of all configured channels is returned (e.g. WebKitBrowser)
+ // @param servers: List of configured servers
+ // @retval ERROR_UNKNOWN_KEY: Could not find the designated channel
+ virtual Core::hresult Status(const Core::OptionalType& name /* @index */, IChannelIterator*& channels /* @out @extract */) const = 0;
};
} // namespace Exchange
-} // namespace Thunder
+
+}
diff --git a/interfaces/Ids.h b/interfaces/Ids.h
index ccf72f16..cf8b4d98 100644
--- a/interfaces/Ids.h
+++ b/interfaces/Ids.h
@@ -236,6 +236,7 @@ namespace Exchange {
ID_AVSCONTROLLER_NOTIFICATION = ID_AVSCLIENT + 2,
ID_INPUT_SWITCH = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x310,
+ ID_INPUT_SWITCH_CHANNELS = ID_INPUT_SWITCH + 1,
ID_DOLBY_OUTPUT = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x320,
ID_DOLBY_OUTPUT_NOTIFICATION = ID_DOLBY_OUTPUT + 1,
diff --git a/jsonrpc/InputSwitch.json b/jsonrpc/InputSwitch.json
deleted file mode 100644
index b37e9940..00000000
--- a/jsonrpc/InputSwitch.json
+++ /dev/null
@@ -1,105 +0,0 @@
-{
- "$schema": "interface.schema.json",
- "jsonrpc": "2.0",
- "info": {
- "version": "1.0.0",
- "title": "Input Switch API",
- "class": "InputSwitch",
- "description": "InputSwitch JSON-RPC interface"
- },
- "common": {
- "$ref": "common.json"
- },
- "methods": {
- "channel": {
- "summary": "Enable or Disable the throughput through the given channel",
- "params": {
- "type": "object",
- "properties": {
- "name": {
- "description": "Callsign that is the owner of this channel",
- "example": "WebKitBrowser",
- "type": "string"
- },
- "enabled": {
- "description": "Enable or disable the throughput of data through this channel",
- "type": "boolean"
- }
- },
- "required": [ "name", "enabled" ]
- },
- "result": {
- "$ref": "#/common/results/void"
- },
- "errors": [
- {
- "description": "Failed to scan",
- "$ref": "#/common/errors/unknownkey"
- }
- ]
- },
- "select": {
- "summary": "Enable the given channel, disabling all othe channels, whish are not immune",
- "params": {
- "type": "object",
- "properties": {
- "name": {
- "description": "Callsign that is the owner of this channel",
- "example": "WebKitBrowser",
- "type": "string"
- }
- },
- "required": [ "name" ]
- },
- "result": {
- "$ref": "#/common/results/void"
- },
- "errors": [
- {
- "description": "Failed to scan",
- "$ref": "#/common/errors/unknownkey"
- }
- ]
- },
- "status": {
- "summary": "Check the status of the requested channel",
- "params": {
- "type": "object",
- "properties": {
- "name": {
- "description": "Callsign that is the owner of this channel",
- "example": "WebKitBrowser",
- "type": "string"
- }
- }
- },
- "result": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "description": "Callsign associated with this channel",
- "type": "string",
- "example": "WebKitBrowser"
- },
- "enabled": {
- "description": "Is the channel enabled to receive info",
- "type": "boolean"
- }
- },
- "required": [
- "name",
- "enabled"
- ]
- }
- },
- "errors": [
- {
- "description": "Could not find the designated channel",
- "$ref": "#/common/errors/unknownkey"
- }
- ]
- }
- }
- }