diff --git a/interfaces/IMessageControl.h b/interfaces/IMessageControl.h index cc02bb4d..1341a5ce 100644 --- a/interfaces/IMessageControl.h +++ b/interfaces/IMessageControl.h @@ -21,6 +21,7 @@ #include "Module.h" +// @insert // @insert namespace WPEFramework { @@ -31,14 +32,7 @@ namespace Exchange { 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,25 @@ 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 controls - virtual uint32_t Controls(IControlIterator*& control /* @out */) const = 0; + // @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 for a specific module + virtual Core::hresult Controls(const string& module /* @index @optional */, IControlIterator*& control /* @out */) const = 0; + + // @json:omit + virtual Core::hresult Controls(IControlIterator*& controls) const = 0; }; } // namespace Exchange