Skip to content

Commit 636f389

Browse files
Renaming interfaces (#382)
* Renaming interfaces * clean up * Update MessageControlPlugin.md --------- Co-authored-by: MFransen69 <39826971+MFransen69@users.noreply.github.com>
1 parent aaa3f24 commit 636f389

5 files changed

Lines changed: 24 additions & 24 deletions

File tree

MessageControl/MessageControl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "MessageControl.h"
2121
#include "MessageOutput.h"
22-
#include <interfaces/json/JMessageControl.h>
22+
#include <interfaces/json/JMessagingControl.h>
2323

2424
namespace Thunder {
2525

@@ -140,7 +140,7 @@ namespace Thunder {
140140
#endif
141141
_webSocketExporter.Initialize(service, _config.MaxExportConnections.Value());
142142

143-
Exchange::JMessageControl::Register(*this, this);
143+
Exchange::JMessagingControl::Register(*this, this);
144144

145145
_service->Register(&_observer);
146146

@@ -156,7 +156,7 @@ namespace Thunder {
156156
if (_service != nullptr) {
157157
ASSERT (_service == service);
158158

159-
Exchange::JMessageControl::Unregister(*this);
159+
Exchange::JMessagingControl::Unregister(*this);
160160

161161
Callback(nullptr);
162162

MessageControl/MessageControl.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Thunder {
3030

3131
namespace Plugin {
3232

33-
class MessageControl : public PluginHost::JSONRPC, public PluginHost::IPluginExtended, public PluginHost::IWebSocket, public Exchange::IMessageControl {
33+
class MessageControl : public PluginHost::JSONRPC, public PluginHost::IPluginExtended, public PluginHost::IWebSocket, public Exchange::IMessagingControl {
3434
private:
3535
using Cleanups = std::vector<uint32_t>;
3636

@@ -158,7 +158,7 @@ namespace Plugin {
158158

159159
public:
160160
//
161-
// Exchange::IMessageControl::INotification
161+
// Exchange::IMessagingControl::INotification
162162
// ----------------------------------------------------------
163163
void Message(const Core::Messaging::MessageInfo& metadata, const Core::Messaging::IEvent& event) override {
164164
_parent.Message(metadata, event);
@@ -303,7 +303,7 @@ namespace Plugin {
303303
INTERFACE_ENTRY(PluginHost::IDispatcher)
304304
INTERFACE_ENTRY(PluginHost::IPluginExtended)
305305
INTERFACE_ENTRY(PluginHost::IWebSocket)
306-
INTERFACE_ENTRY(Exchange::IMessageControl)
306+
INTERFACE_ENTRY(Exchange::IMessagingControl)
307307
END_INTERFACE_MAP
308308

309309
public:
@@ -424,7 +424,7 @@ namespace Plugin {
424424
return (Core::ERROR_NONE);
425425
}
426426

427-
Core::hresult Modules(Exchange::IMessageControl::IStringIterator*& modules) const override
427+
Core::hresult Modules(Exchange::IMessagingControl::IStringIterator*& modules) const override
428428
{
429429
std::vector<string> list;
430430

@@ -436,18 +436,18 @@ namespace Plugin {
436436
return (Core::ERROR_NONE);
437437
}
438438

439-
Core::hresult Controls(const string& module, Exchange::IMessageControl::IControlIterator*& controls) const override
439+
Core::hresult Controls(const string& module, Exchange::IMessagingControl::IControlIterator*& controls) const override
440440
{
441-
std::vector<Exchange::IMessageControl::Control> list;
441+
std::vector<Exchange::IMessagingControl::Control> list;
442442
Messaging::MessageUnit::Iterator index;
443443
_client.Controls(index, module);
444444

445445
while (index.Next() == true) {
446446
list.push_back( { static_cast<messagetype>(index.Type()), index.Category(), index.Module(), index.Enabled() } );
447447
}
448448

449-
using Implementation = RPC::IteratorType<Exchange::IMessageControl::IControlIterator, std::vector<Exchange::IMessageControl::Control>>;
450-
controls = Core::ServiceType<Implementation>::Create<Exchange::IMessageControl::IControlIterator>(std::move(list));
449+
using Implementation = RPC::IteratorType<Exchange::IMessagingControl::IControlIterator, std::vector<Exchange::IMessagingControl::Control>>;
450+
controls = Core::ServiceType<Implementation>::Create<Exchange::IMessagingControl::IControlIterator>(std::move(list));
451451

452452
return (Core::ERROR_NONE);
453453
}

MessageControl/MessageControlPlugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@
5555
]
5656
},
5757
"interface": {
58-
"$ref": "{cppinterfacedir}/IMessageControl.h"
58+
"$ref": "{cppinterfacedir}/IMessagingControl.h"
5959
}
6060
}

MessageControl/Module.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#include <plugins/plugins.h>
2828
#include <definitions/definitions.h>
2929

30-
#include <interfaces/IMessageControl.h>
31-
#include <interfaces/json/JsonData_MessageControl.h>
30+
#include <interfaces/IMessagingControl.h>
31+
#include <interfaces/json/JsonData_MessagingControl.h>
3232

3333

3434
#undef EXTERNAL

MessageControl/doc/MessageControlPlugin.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Generated automatically, DO NOT EDIT! -->
1+
<!-- Generated automatically, DO NOT EDIT! -->
22
<a id="head_MessageControl_Plugin"></a>
33
# MessageControl Plugin
44

@@ -91,7 +91,7 @@ The table below lists configuration options of the plugin.
9191

9292
This plugin implements the following interfaces:
9393

94-
- IMessageControl ([IMessageControl.h](https://github.com/rdkcentral/ThunderInterfaces/blob/master/interfaces/IMessageControl.h)) (version 1.0.0) (compliant format)
94+
- IMessagingControl ([IMessagingControl.h](https://github.com/rdkcentral/ThunderInterfaces/blob/master/interfaces/IMessagingControl.h)) (version 1.0.0) (compliant format)
9595
> This interface uses legacy ```lowercase``` naming convention. With the next major release the naming convention will change to ```camelCase```.
9696
9797
<a id="head_Methods"></a>
@@ -140,7 +140,7 @@ This method takes no parameters.
140140
{
141141
"jsonrpc": "2.0",
142142
"id": 42,
143-
"method": "MessageControl.1.versions"
143+
"method": "MessageControl.versions"
144144
}
145145
```
146146

@@ -191,9 +191,9 @@ This method will return *True* for the following methods/properties: *modules, c
191191
{
192192
"jsonrpc": "2.0",
193193
"id": 42,
194-
"method": "MessageControl.1.exists",
194+
"method": "MessageControl.exists",
195195
"params": {
196-
"method": "modules"
196+
"method": "methodName"
197197
}
198198
}
199199
```
@@ -218,7 +218,7 @@ Enables/disables a message control.
218218
| Name | Type | M/O | Description |
219219
| :-------- | :-------- | :-------- | :-------- |
220220
| params | object | mandatory | *...* |
221-
| params.type | string | mandatory | Message type (must be one of the following: *Assert, Invalid, Logging, OperationalStream, Reporting, Tracing*) |
221+
| params.type | string | mandatory | Message type (must be one of the following: *Assert, Invalid, Logging, OperationalStream, Reporting, Telemetry, Tracing*) |
222222
| params.category | string | mandatory | Name of the message category |
223223
| params.module | string | mandatory | Name of the module the message is originating from |
224224
| params.enabled | boolean | mandatory | Denotes if control should be enabled (true) or disabled (false) |
@@ -237,7 +237,7 @@ Enables/disables a message control.
237237
{
238238
"jsonrpc": "2.0",
239239
"id": 42,
240-
"method": "MessageControl.1.enable",
240+
"method": "MessageControl.enable",
241241
"params": {
242242
"type": "Tracing",
243243
"category": "Information",
@@ -291,7 +291,7 @@ Provides access to the retrieves a list of current message modules.
291291
{
292292
"jsonrpc": "2.0",
293293
"id": 42,
294-
"method": "MessageControl.1.modules"
294+
"method": "MessageControl.modules"
295295
}
296296
```
297297

@@ -328,7 +328,7 @@ Provides access to the retrieves a list of current message controls for a specif
328328
| :-------- | :-------- | :-------- | :-------- |
329329
| (property) | array | mandatory | Retrieves a list of current message controls for a specific module |
330330
| (property)[#] | object | mandatory | *...* |
331-
| (property)[#].type | string | mandatory | Type of message (must be one of the following: *Assert, Invalid, Logging, OperationalStream, Reporting, Tracing*) |
331+
| (property)[#].type | string | mandatory | Type of message (must be one of the following: *Assert, Invalid, Logging, OperationalStream, Reporting, Telemetry, Tracing*) |
332332
| (property)[#].category | string | mandatory | Name of the message category |
333333
| (property)[#].module | string | mandatory | Name of the module the message is originating from |
334334
| (property)[#].enabled | boolean | mandatory | Denotes if the control is enabled (true) or disabled (false) |
@@ -341,7 +341,7 @@ Provides access to the retrieves a list of current message controls for a specif
341341
{
342342
"jsonrpc": "2.0",
343343
"id": 42,
344-
"method": "MessageControl.1.controls@xyz"
344+
"method": "MessageControl.controls@xyz"
345345
}
346346
```
347347

0 commit comments

Comments
 (0)