Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions interfaces/IMessageControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "Module.h"

// @insert <core/MessageStore.h>
// @insert <com/IIteratorType.h>

namespace WPEFramework {
Expand All @@ -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;

Comment thread
VeithMetro marked this conversation as resolved.
struct Control {
messagetype type /* @brief Type of message */;
Expand All @@ -48,17 +42,25 @@ struct EXTERNAL IMessageControl : virtual public Core::IUnknown {
};

using IControlIterator = RPC::IIteratorType<Control, ID_MESSAGE_CONTROL_ITERATOR>;
using IStringIterator = RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>;

// @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)
Comment thread
VeithMetro marked this conversation as resolved.
Comment thread
VeithMetro marked this conversation as resolved.
Comment thread
VeithMetro marked this conversation as resolved.
// @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;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebaszm we have @json:omit here, but does /* @out */ perhaps have any effect on the COM-RPC?

Comment thread
VeithMetro marked this conversation as resolved.
};

} // namespace Exchange
Expand Down
Loading