From 424d77307bd00a23b5e18f00347caebe03c226e5 Mon Sep 17 00:00:00 2001 From: VeithMetro Date: Fri, 8 May 2026 09:22:22 +0200 Subject: [PATCH 1/5] Backport IMessageControl --- interfaces/IMessageControl.h | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/interfaces/IMessageControl.h b/interfaces/IMessageControl.h index cc02bb4d..03c32394 100644 --- a/interfaces/IMessageControl.h +++ b/interfaces/IMessageControl.h @@ -21,24 +21,18 @@ #include "Module.h" +// @insert // @insert namespace WPEFramework { namespace Exchange { -// @json +// @json 1.0.0 @text:legacy_lowercase struct EXTERNAL IMessageControl : virtual public Core::IUnknown { enum { ID = ID_MESSAGE_CONTROL }; - - enum messagetype : uint8_t { - TRACING = 1, - LOGGING = 2, - REPORTING = 3, - STANDARD_OUT = 4, - STANDARD_ERROR = 5 - }; + using messagetype = Core::Messaging::Metadata::type; struct Control { messagetype type /* @brief Type of message */; @@ -48,17 +42,22 @@ struct EXTERNAL IMessageControl : virtual public Core::IUnknown { }; using IControlIterator = RPC::IIteratorType; + using IStringIterator = RPC::IIteratorType; // @brief Enables/disables a message control - // @param type Message type - // @param module Name of the module the message is originating from (e.g. Plugin_BluetoothControl) - // @param category Name of the message category (e.g. Information) - // @param enabled Denotes if control should be enabled (true) or disabled (false) - virtual uint32_t Enable(const messagetype type, const string& category, const string& module, const bool enabled) = 0; + // @param type: Message type + // @param module: Name of the module the message is originating from (e.g. Plugin_BluetoothControl) + // @param category: Name of the message category (e.g. Information) + // @param enabled: Denotes if control should be enabled (true) or disabled (false) + virtual Core::hresult Enable(const messagetype type, const string& category, const string& module, const bool enabled) = 0; + + // @property + // @brief Retrieves a list of current message modules + virtual Core::hresult Modules(IStringIterator*& modules /* @out */) const = 0; // @property - // @brief Retrieves a list of current message controls - virtual uint32_t Controls(IControlIterator*& control /* @out */) const = 0; + // @brief Retrieves a list of current message controls for a specific module + virtual Core::hresult Controls(const string& module /* @index */, IControlIterator*& control /* @out */) const = 0; }; } // namespace Exchange From 1191fa84207e0451ce8d75794353912e9f959b6e Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Fri, 8 May 2026 13:22:19 +0200 Subject: [PATCH 2/5] Remove legacy text comment from IMessageControl --- interfaces/IMessageControl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/IMessageControl.h b/interfaces/IMessageControl.h index 03c32394..84155252 100644 --- a/interfaces/IMessageControl.h +++ b/interfaces/IMessageControl.h @@ -28,7 +28,7 @@ namespace WPEFramework { namespace Exchange { -// @json 1.0.0 @text:legacy_lowercase +// @json 1.0.0 struct EXTERNAL IMessageControl : virtual public Core::IUnknown { enum { ID = ID_MESSAGE_CONTROL }; From f8db4926726b3880e163f23145caebc81fd377de Mon Sep 17 00:00:00 2001 From: VeithMetro Date: Fri, 8 May 2026 14:36:16 +0200 Subject: [PATCH 3/5] Bring back the old Controls method for backwards compatibility --- interfaces/IMessageControl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interfaces/IMessageControl.h b/interfaces/IMessageControl.h index 03c32394..d631ab2e 100644 --- a/interfaces/IMessageControl.h +++ b/interfaces/IMessageControl.h @@ -58,6 +58,10 @@ struct EXTERNAL IMessageControl : virtual public Core::IUnknown { // @property // @brief Retrieves a list of current message controls for a specific module virtual Core::hresult Controls(const string& module /* @index */, IControlIterator*& control /* @out */) const = 0; + + // @property + // @brief Retrieves a list of all current message controls + virtual Core::hresult Controls(IControlIterator*& controls /* @out */) const = 0; }; } // namespace Exchange From 8861e016e4974f0bdebc0a225dba2b94fbf51b56 Mon Sep 17 00:00:00 2001 From: VeithMetro Date: Fri, 8 May 2026 15:01:14 +0200 Subject: [PATCH 4/5] Make sure the second Controls methods works on JSON-RPC --- interfaces/IMessageControl.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/interfaces/IMessageControl.h b/interfaces/IMessageControl.h index 376eab99..1341a5ce 100644 --- a/interfaces/IMessageControl.h +++ b/interfaces/IMessageControl.h @@ -28,7 +28,7 @@ namespace WPEFramework { namespace Exchange { -// @json 1.0.0 +// @json struct EXTERNAL IMessageControl : virtual public Core::IUnknown { enum { ID = ID_MESSAGE_CONTROL }; @@ -57,11 +57,10 @@ struct EXTERNAL IMessageControl : virtual public Core::IUnknown { // @property // @brief Retrieves a list of current message controls for a specific module - virtual Core::hresult Controls(const string& module /* @index */, IControlIterator*& control /* @out */) const = 0; + virtual Core::hresult Controls(const string& module /* @index @optional */, IControlIterator*& control /* @out */) const = 0; - // @property - // @brief Retrieves a list of all current message controls - virtual Core::hresult Controls(IControlIterator*& controls /* @out */) const = 0; + // @json:omit + virtual Core::hresult Controls(IControlIterator*& controls) const = 0; }; } // namespace Exchange From 12adad969118e9da2996cc6393b2983cd7d98fcb Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Fri, 29 May 2026 11:17:09 +0200 Subject: [PATCH 5/5] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- interfaces/IMessageControl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/IMessageControl.h b/interfaces/IMessageControl.h index 1341a5ce..c60ce964 100644 --- a/interfaces/IMessageControl.h +++ b/interfaces/IMessageControl.h @@ -60,7 +60,7 @@ struct EXTERNAL IMessageControl : virtual public Core::IUnknown { virtual Core::hresult Controls(const string& module /* @index @optional */, IControlIterator*& control /* @out */) const = 0; // @json:omit - virtual Core::hresult Controls(IControlIterator*& controls) const = 0; + virtual Core::hresult Controls(IControlIterator*& controls /* @out */) const = 0; }; } // namespace Exchange