|
@@ -36,11 +36,11 @@ namespace Exchange {
|
|
|
36
36
|
_module__.PluginHost::JSONRPC::template Register<Core::JSON::ArrayType<Core::JSON::String>, Core::JSON::ArrayType<Core::JSON::String>>(_T("userScripts"),
|
|
37
37
|
[_implementation__](const Core::JSON::ArrayType<Core::JSON::String>& params, Core::JSON::ArrayType<Core::JSON::String>& result) -> uint32_t {
|
|
38
38
|
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
39
39
|
|
|
40
40
|
if (params.IsSet() == false) {
|
|
41
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
41
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _result_{};
|
|
42
42
|
|
|
43
43
|
_errorCode__ = (static_cast<const IBrowserResources*>(_implementation__))->UserScripts(_result_);
|
|
44
44
|
|
|
45
45
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
46
46
|
result.Set(true);
|
|
@@ -51,19 +51,22 @@ namespace Exchange {
|
|
|
51
51
|
_result_->Release();
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _params_{};
|
|
56
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _params_{};
|
|
57
57
|
std::list<string> _paramsElements_{};
|
|
58
58
|
auto _paramsIterator_ = params.Elements();
|
|
59
59
|
while (_paramsIterator_.Next() == true) { _paramsElements_.push_back(_paramsIterator_.Current()); }
|
|
60
|
-
using _paramsIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>>;
|
|
61
|
-
_params_ = Core::ServiceType<_paramsIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>>(std::move(_paramsElements_));
|
|
60
|
+
using _paramsIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>>;
|
|
61
|
+
_params_ = Core::ServiceType<_paramsIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>>(std::move(_paramsElements_));
|
|
62
62
|
ASSERT(_params_ != nullptr);
|
|
63
63
|
|
|
64
|
-
_errorCode__ = _implementation__->UserScripts(static_cast<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* const&>(_params_));
|
|
64
|
+
_errorCode__ = _implementation__->UserScripts(static_cast<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* const&>(_params_));
|
|
65
|
+
if (_params_ != nullptr) {
|
|
66
|
+
_params_->Release();
|
|
67
|
+
}
|
|
65
68
|
|
|
66
69
|
result.Null(true);
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
return (_errorCode__);
|
|
@@ -73,11 +76,11 @@ namespace Exchange {
|
|
|
73
76
|
_module__.PluginHost::JSONRPC::template Register<Core::JSON::ArrayType<Core::JSON::String>, Core::JSON::ArrayType<Core::JSON::String>>(_T("userStyleSheets"),
|
|
74
77
|
[_implementation__](const Core::JSON::ArrayType<Core::JSON::String>& params, Core::JSON::ArrayType<Core::JSON::String>& result) -> uint32_t {
|
|
75
78
|
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
76
79
|
|
|
77
80
|
if (params.IsSet() == false) {
|
|
78
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
81
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _result_{};
|
|
79
82
|
|
|
80
83
|
_errorCode__ = (static_cast<const IBrowserResources*>(_implementation__))->UserStyleSheets(_result_);
|
|
81
84
|
|
|
82
85
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
83
86
|
result.Set(true);
|
|
@@ -88,19 +91,22 @@ namespace Exchange {
|
|
|
88
91
|
_result_->Release();
|
|
89
92
|
}
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
else {
|
|
93
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _params_{};
|
|
96
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _params_{};
|
|
94
97
|
std::list<string> _paramsElements_{};
|
|
95
98
|
auto _paramsIterator_ = params.Elements();
|
|
96
99
|
while (_paramsIterator_.Next() == true) { _paramsElements_.push_back(_paramsIterator_.Current()); }
|
|
97
|
-
using _paramsIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>>;
|
|
98
|
-
_params_ = Core::ServiceType<_paramsIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>>(std::move(_paramsElements_));
|
|
100
|
+
using _paramsIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>>;
|
|
101
|
+
_params_ = Core::ServiceType<_paramsIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>>(std::move(_paramsElements_));
|
|
99
102
|
ASSERT(_params_ != nullptr);
|
|
100
103
|
|
|
101
|
-
_errorCode__ = _implementation__->UserStyleSheets(static_cast<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* const&>(_params_));
|
|
104
|
+
_errorCode__ = _implementation__->UserStyleSheets(static_cast<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* const&>(_params_));
|
|
105
|
+
if (_params_ != nullptr) {
|
|
106
|
+
_params_->Release();
|
|
107
|
+
}
|
|
102
108
|
|
|
103
109
|
result.Null(true);
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
return (_errorCode__);
|
|
@@ -93,11 +93,11 @@ namespace Exchange {
|
|
|
93
93
|
// Property: 'observables' - List of services watched by the Monitor (r/o)
|
|
94
94
|
_module__.PluginHost::JSONRPC::template Register<void, Core::JSON::ArrayType<Core::JSON::String>>(_T("observables"),
|
|
95
95
|
[_implementation__](Core::JSON::ArrayType<Core::JSON::String>& result) -> uint32_t {
|
|
96
96
|
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
97
97
|
|
|
98
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
98
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _result_{};
|
|
99
99
|
|
|
100
100
|
_errorCode__ = _implementation__->Observables(_result_);
|
|
101
101
|
|
|
102
102
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
103
103
|
result.Set(true);
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
// Generated automatically from 'IMessageControl.h'. DO NOT EDIT.
|
|
2
|
-
|
|
3
|
-
#pragma once
|
|
4
|
-
#include "Module.h"
|
|
5
|
-
#include "JsonData_MessageControl.h"
|
|
6
|
-
#include <interfaces/IMessageControl.h>
|
|
7
|
-
|
|
8
|
-
namespace Thunder {
|
|
9
|
-
|
|
10
|
-
namespace Exchange {
|
|
11
|
-
|
|
12
|
-
namespace JMessageControl {
|
|
13
|
-
|
|
14
|
-
namespace Version {
|
|
15
|
-
|
|
16
|
-
constexpr uint8_t Major = 1;
|
|
17
|
-
constexpr uint8_t Minor = 0;
|
|
18
|
-
constexpr uint8_t Patch = 0;
|
|
19
|
-
|
|
20
|
-
} // namespace Version
|
|
21
|
-
|
|
22
|
-
PUSH_WARNING(DISABLE_WARNING_UNUSED_FUNCTIONS)
|
|
23
|
-
PUSH_WARNING(DISABLE_WARNING_DEPRECATED_USE)
|
|
24
|
-
PUSH_WARNING(DISABLE_WARNING_TYPE_LIMITS)
|
|
25
|
-
|
|
26
|
-
template<typename MODULE>
|
|
27
|
-
static void Register(MODULE& _module__, IMessageControl* _implementation__)
|
|
28
|
-
{
|
|
29
|
-
ASSERT(_implementation__ != nullptr);
|
|
30
|
-
|
|
31
|
-
_module__.PluginHost::JSONRPC::RegisterVersion(_T("JMessageControl"), Version::Major, Version::Minor, Version::Patch);
|
|
32
|
-
|
|
33
|
-
// Register methods and properties...
|
|
34
|
-
|
|
35
|
-
// Method: 'enable' - Enables/disables a message control
|
|
36
|
-
_module__.PluginHost::JSONRPC::template Register<JsonData::MessageControl::ControlInfo, void>(_T("enable"),
|
|
37
|
-
[_implementation__](const JsonData::MessageControl::ControlInfo& params) -> uint32_t {
|
|
38
|
-
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
39
|
-
|
|
40
|
-
if ((params.IsSet() == false) || (params.IsDataValid() == false)) {
|
|
41
|
-
_errorCode__ = Core::ERROR_BAD_REQUEST;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
const Exchange::IMessageControl::messagetype _type_{params.Type};
|
|
45
|
-
const string _category_{params.Category};
|
|
46
|
-
const string _module_{params.Module};
|
|
47
|
-
const bool _enabled_{params.Enabled};
|
|
48
|
-
|
|
49
|
-
_errorCode__ = _implementation__->Enable(_type_, _category_, _module_, _enabled_);
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return (_errorCode__);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
// Property: 'modules' - Retrieves a list of current message modules (r/o)
|
|
57
|
-
_module__.PluginHost::JSONRPC::template Register<void, Core::JSON::ArrayType<Core::JSON::String>>(_T("modules"),
|
|
58
|
-
[_implementation__](Core::JSON::ArrayType<Core::JSON::String>& result) -> uint32_t {
|
|
59
|
-
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
60
|
-
|
|
61
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
62
|
-
|
|
63
|
-
_errorCode__ = _implementation__->Modules(_result_);
|
|
64
|
-
|
|
65
|
-
if (_errorCode__ == Core::ERROR_NONE) {
|
|
66
|
-
result.Set(true);
|
|
67
|
-
|
|
68
|
-
if (_result_ != nullptr) {
|
|
69
|
-
string _resultItem__{};
|
|
70
|
-
while (_result_->Next(_resultItem__) == true) { result.Add() = _resultItem__; }
|
|
71
|
-
_result_->Release();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return (_errorCode__);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
// Indexed Property: 'controls' - Retrieves a list of current message controls for a specific module (r/o)
|
|
79
|
-
_module__.PluginHost::JSONRPC::template Register<void, Core::JSON::ArrayType<JsonData::MessageControl::ControlInfo>, std::function<uint32_t(const string&, Core::JSON::ArrayType<JsonData::MessageControl::ControlInfo>&)>>(_T("controls"),
|
|
80
|
-
[_implementation__](const string& module, Core::JSON::ArrayType<JsonData::MessageControl::ControlInfo>& result) -> uint32_t {
|
|
81
|
-
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
82
|
-
|
|
83
|
-
if (module.empty() == true) {
|
|
84
|
-
_errorCode__ = Core::ERROR_BAD_REQUEST;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (_errorCode__ == Core::ERROR_NONE) {
|
|
88
|
-
::Thunder::RPC::IIteratorType<IMessageControl::Control, ID_MESSAGE_CONTROL_ITERATOR>* _result_{};
|
|
89
|
-
|
|
90
|
-
_errorCode__ = _implementation__->Controls(module, _result_);
|
|
91
|
-
|
|
92
|
-
if (_errorCode__ == Core::ERROR_NONE) {
|
|
93
|
-
result.Set(true);
|
|
94
|
-
|
|
95
|
-
if (_result_ != nullptr) {
|
|
96
|
-
Exchange::IMessageControl::Control _resultItem__{};
|
|
97
|
-
while (_result_->Next(_resultItem__) == true) { result.Add() = _resultItem__; }
|
|
98
|
-
_result_->Release();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return (_errorCode__);
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
template<typename MODULE>
|
|
109
|
-
static void Unregister(MODULE& _module__)
|
|
110
|
-
{
|
|
111
|
-
// Unregister methods and properties...
|
|
112
|
-
_module__.PluginHost::JSONRPC::Unregister(_T("enable"));
|
|
113
|
-
_module__.PluginHost::JSONRPC::Unregister(_T("modules"));
|
|
114
|
-
_module__.PluginHost::JSONRPC::Unregister(_T("controls"));
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
POP_WARNING()
|
|
118
|
-
POP_WARNING()
|
|
119
|
-
POP_WARNING()
|
|
120
|
-
|
|
121
|
-
} // namespace JMessageControl
|
|
122
|
-
|
|
123
|
-
} // namespace Exchange
|
|
124
|
-
|
|
125
|
-
} // namespace Thunder
|
|
126
|
-
|
|
@@ -56,11 +56,11 @@ namespace Exchange {
|
|
|
56
56
|
// Property: 'modules' - Retrieves a list of current message modules (r/o)
|
|
57
57
|
_module__.PluginHost::JSONRPC::template Register<void, Core::JSON::ArrayType<Core::JSON::String>>(_T("modules"),
|
|
58
58
|
[_implementation__](Core::JSON::ArrayType<Core::JSON::String>& result) -> uint32_t {
|
|
59
59
|
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
60
60
|
|
|
61
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
61
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _result_{};
|
|
62
62
|
|
|
63
63
|
_errorCode__ = _implementation__->Modules(_result_);
|
|
64
64
|
|
|
65
65
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
66
66
|
result.Set(true);
|
|
@@ -51,21 +51,24 @@ namespace Exchange {
|
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
53
|
const string _room_{params.Room};
|
|
54
54
|
const string _user_{params.User};
|
|
55
55
|
const Exchange::JSONRPC::IMessenger::security _secure_{params.Secure};
|
|
56
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _acl_{};
|
|
56
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _acl_{};
|
|
57
57
|
std::list<string> _aclElements_{};
|
|
58
58
|
auto _aclIterator_ = params.Acl.Elements();
|
|
59
59
|
while (_aclIterator_.Next() == true) { _aclElements_.push_back(_aclIterator_.Current()); }
|
|
60
|
-
using _aclIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>>;
|
|
61
|
-
_acl_ = Core::ServiceType<_aclIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>>(std::move(_aclElements_));
|
|
60
|
+
using _aclIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>>;
|
|
61
|
+
_acl_ = Core::ServiceType<_aclIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>>(std::move(_aclElements_));
|
|
62
62
|
ASSERT(_acl_ != nullptr);
|
|
63
63
|
|
|
64
64
|
string _roomId_{};
|
|
65
65
|
|
|
66
66
|
_errorCode__ = _implementation__->Join(context_, _room_, _user_, _secure_, _acl_, _roomId_);
|
|
67
|
+
if (_acl_ != nullptr) {
|
|
68
|
+
_acl_->Release();
|
|
69
|
+
}
|
|
67
70
|
|
|
68
71
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
69
72
|
roomId = _roomId_;
|
|
70
73
|
}
|
|
71
74
|
}
|
|
@@ -208,16 +211,16 @@ namespace Exchange {
|
|
|
208
211
|
static void UserUpdate(const MODULE& module_, const string& id_, const JsonData::Messenger::UserUpdateParamsData& params, typename MODULE::SendIfMethod sendIfMethod_ = nullptr)
|
|
209
212
|
{
|
|
210
213
|
if (sendIfMethod_ == nullptr) {
|
|
211
214
|
module_.Notify(_T("userupdate"), params, [&id_](const string& designator_) -> bool {
|
|
212
215
|
Core::hresult _errorCode__ = Core::ERROR_NONE;
|
|
213
|
-
const string
|
|
216
|
+
const string index_ = designator_.substr(0, designator_.find('.'));
|
|
214
217
|
|
|
215
|
-
if (
|
|
218
|
+
if (index_.empty() == true) {
|
|
216
219
|
_errorCode__ = Core::ERROR_BAD_REQUEST;
|
|
217
220
|
}
|
|
218
|
-
return ((_errorCode__ == Core::ERROR_NONE) && (id_ ==
|
|
221
|
+
return ((_errorCode__ == Core::ERROR_NONE) && (id_ == index_));
|
|
219
222
|
});
|
|
220
223
|
}
|
|
221
224
|
else {
|
|
222
225
|
module_.Notify(_T("userupdate"), params, sendIfMethod_);
|
|
223
226
|
}
|
|
@@ -228,16 +231,16 @@ namespace Exchange {
|
|
|
228
231
|
static void UserUpdate(const MODULE& module_, const string& id_, const JsonData::Messenger::UserUpdateParamsData& params, const string& client_)
|
|
229
232
|
{
|
|
230
233
|
module_.Notify(_T("userupdate"), params, [&id_, &client_](const string& designator_) -> bool {
|
|
231
234
|
Core::hresult _errorCode__ = Core::ERROR_NONE;
|
|
232
235
|
const size_t _dot = designator_.find('.');
|
|
233
|
-
const string
|
|
236
|
+
const string index_ = designator_.substr(0, _dot);
|
|
234
237
|
|
|
235
|
-
if (
|
|
238
|
+
if (index_.empty() == true) {
|
|
236
239
|
_errorCode__ = Core::ERROR_BAD_REQUEST;
|
|
237
240
|
}
|
|
238
|
-
return ((_errorCode__ == Core::ERROR_NONE) && ((client_.empty() == true) || (client_ == designator_.substr(_dot + 1))) && (id_ ==
|
|
241
|
+
return ((_errorCode__ == Core::ERROR_NONE) && ((client_.empty() == true) || (client_ == designator_.substr(_dot + 1))) && (id_ == index_));
|
|
239
242
|
});
|
|
240
243
|
}
|
|
241
244
|
|
|
242
245
|
// Event: 'userupdate' - Notifies of user status changes
|
|
243
246
|
template<typename MODULE>
|
|
@@ -288,16 +291,16 @@ namespace Exchange {
|
|
|
288
291
|
static void Message(const MODULE& module_, const string& id_, const JsonData::Messenger::MessageParamsData& params, typename MODULE::SendIfMethod sendIfMethod_ = nullptr)
|
|
289
292
|
{
|
|
290
293
|
if (sendIfMethod_ == nullptr) {
|
|
291
294
|
module_.Notify(_T("message"), params, [&id_](const string& designator_) -> bool {
|
|
292
295
|
Core::hresult _errorCode__ = Core::ERROR_NONE;
|
|
293
|
-
const string
|
|
296
|
+
const string index_ = designator_.substr(0, designator_.find('.'));
|
|
294
297
|
|
|
295
|
-
if (
|
|
298
|
+
if (index_.empty() == true) {
|
|
296
299
|
_errorCode__ = Core::ERROR_BAD_REQUEST;
|
|
297
300
|
}
|
|
298
|
-
return ((_errorCode__ == Core::ERROR_NONE) && (id_ ==
|
|
301
|
+
return ((_errorCode__ == Core::ERROR_NONE) && (id_ == index_));
|
|
299
302
|
});
|
|
300
303
|
}
|
|
301
304
|
else {
|
|
302
305
|
module_.Notify(_T("message"), params, sendIfMethod_);
|
|
303
306
|
}
|
|
@@ -53,11 +53,11 @@ namespace Exchange {
|
|
|
53
53
|
// Property: 'interfaces' - Currently available interfaces (r/o)
|
|
54
54
|
_module__.PluginHost::JSONRPC::template Register<void, Core::JSON::ArrayType<Core::JSON::String>>(_T("interfaces"),
|
|
55
55
|
[_implementation__](Core::JSON::ArrayType<Core::JSON::String>& result) -> uint32_t {
|
|
56
56
|
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
57
57
|
|
|
58
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
58
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _result_{};
|
|
59
59
|
|
|
60
60
|
_errorCode__ = _implementation__->Interfaces(_result_);
|
|
61
61
|
|
|
62
62
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
63
63
|
result.Set(true);
|
|
@@ -133,10 +133,13 @@ namespace Exchange {
|
|
|
133
133
|
using _valueIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<INetworkControl::NetworkInfo, ID_NETWORKCONTROL_NETWORK_INFO_ITERATOR>>;
|
|
134
134
|
_value_ = Core::ServiceType<_valueIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<INetworkControl::NetworkInfo, ID_NETWORKCONTROL_NETWORK_INFO_ITERATOR>>(std::move(_valueElements_));
|
|
135
135
|
ASSERT(_value_ != nullptr);
|
|
136
136
|
|
|
137
137
|
_errorCode__ = _implementation__->Network(interface, static_cast<::Thunder::RPC::IIteratorType<INetworkControl::NetworkInfo, ID_NETWORKCONTROL_NETWORK_INFO_ITERATOR>* const&>(_value_));
|
|
138
|
+
if (_value_ != nullptr) {
|
|
139
|
+
_value_->Release();
|
|
140
|
+
}
|
|
138
141
|
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
result.Null(true);
|
|
142
145
|
}
|
|
@@ -149,11 +152,11 @@ namespace Exchange {
|
|
|
149
152
|
_module__.PluginHost::JSONRPC::template Register<JsonData::NetworkControl::DNSData, Core::JSON::ArrayType<Core::JSON::String>>(_T("dns"),
|
|
150
153
|
[_implementation__](const JsonData::NetworkControl::DNSData& params, Core::JSON::ArrayType<Core::JSON::String>& result) -> uint32_t {
|
|
151
154
|
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
152
155
|
|
|
153
156
|
if (params.IsSet() == false) {
|
|
154
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
157
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _result_{};
|
|
155
158
|
|
|
156
159
|
_errorCode__ = (static_cast<const INetworkControl*>(_implementation__))->DNS(_result_);
|
|
157
160
|
|
|
158
161
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
159
162
|
result.Set(true);
|
|
@@ -169,19 +172,22 @@ namespace Exchange {
|
|
|
169
172
|
|
|
170
173
|
if (params.IsDataValid() == false) {
|
|
171
174
|
_errorCode__ = Core::ERROR_BAD_REQUEST;
|
|
172
175
|
}
|
|
173
176
|
else {
|
|
174
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _value_{};
|
|
177
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _value_{};
|
|
175
178
|
std::list<string> _valueElements_{};
|
|
176
179
|
auto _valueIterator_ = params.Value.Elements();
|
|
177
180
|
while (_valueIterator_.Next() == true) { _valueElements_.push_back(_valueIterator_.Current()); }
|
|
178
|
-
using _valueIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>>;
|
|
179
|
-
_value_ = Core::ServiceType<_valueIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>>(std::move(_valueElements_));
|
|
181
|
+
using _valueIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>>;
|
|
182
|
+
_value_ = Core::ServiceType<_valueIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>>(std::move(_valueElements_));
|
|
180
183
|
ASSERT(_value_ != nullptr);
|
|
181
184
|
|
|
182
|
-
_errorCode__ = _implementation__->DNS(static_cast<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* const&>(_value_));
|
|
185
|
+
_errorCode__ = _implementation__->DNS(static_cast<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* const&>(_value_));
|
|
186
|
+
if (_value_ != nullptr) {
|
|
187
|
+
_value_->Release();
|
|
188
|
+
}
|
|
183
189
|
|
|
184
190
|
}
|
|
185
191
|
|
|
186
192
|
result.Null(true);
|
|
187
193
|
}
|
|
@@ -34,11 +34,11 @@ namespace Exchange {
|
|
|
34
34
|
// Property: 'systems' - Supported DRM systems (r/o)
|
|
35
35
|
_module__.PluginHost::JSONRPC::template Register<void, Core::JSON::ArrayType<Core::JSON::String>>(_T("systems"),
|
|
36
36
|
[_implementation__](Core::JSON::ArrayType<Core::JSON::String>& result) -> uint32_t {
|
|
37
37
|
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
38
38
|
|
|
39
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
39
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _result_{};
|
|
40
40
|
|
|
41
41
|
_errorCode__ = _implementation__->Systems(_result_);
|
|
42
42
|
|
|
43
43
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
44
44
|
result.Set(true);
|
|
@@ -61,11 +61,11 @@ namespace Exchange {
|
|
|
61
61
|
if (keySystem.empty() == true) {
|
|
62
62
|
_errorCode__ = Core::ERROR_BAD_REQUEST;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
66
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
66
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _result_{};
|
|
67
67
|
|
|
68
68
|
_errorCode__ = _implementation__->Designators(keySystem, _result_);
|
|
69
69
|
|
|
70
70
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
71
71
|
result.Set(true);
|
|
@@ -35,11 +35,11 @@ namespace Exchange {
|
|
|
35
35
|
// Method: 'devices' - Get a string array defning al devices hooked up to this hub
|
|
36
36
|
_module__.PluginHost::JSONRPC::template Register<void, Core::JSON::ArrayType<Core::JSON::String>>(_T("devices"),
|
|
37
37
|
[_implementation__](Core::JSON::ArrayType<Core::JSON::String>& iterator) -> uint32_t {
|
|
38
38
|
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
39
39
|
|
|
40
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _iterator_{};
|
|
40
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _iterator_{};
|
|
41
41
|
|
|
42
42
|
_errorCode__ = _implementation__->Devices(_iterator_);
|
|
43
43
|
|
|
44
44
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
45
45
|
iterator.Set(true);
|
|
@@ -63,11 +63,11 @@ namespace Exchange {
|
|
|
63
63
|
_errorCode__ = Core::ERROR_BAD_REQUEST;
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
66
|
const uint16_t _vendorId_{params.VendorId};
|
|
67
67
|
const uint16_t _productId_{params.ProductId};
|
|
68
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _iterator_{};
|
|
68
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _iterator_{};
|
|
69
69
|
|
|
70
70
|
_errorCode__ = _implementation__->VendorDevices(_vendorId_, _productId_, _iterator_);
|
|
71
71
|
|
|
72
72
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
73
73
|
iterator.Set(true);
|
|
@@ -56,11 +56,11 @@ namespace Exchange {
|
|
|
56
56
|
_module__.PluginHost::JSONRPC::template Register<Core::JSON::ArrayType<Core::JSON::String>, Core::JSON::ArrayType<Core::JSON::String>>(_T("languages"),
|
|
57
57
|
[_implementation__](const Core::JSON::ArrayType<Core::JSON::String>& params, Core::JSON::ArrayType<Core::JSON::String>& result) -> uint32_t {
|
|
58
58
|
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
59
59
|
|
|
60
60
|
if (params.IsSet() == false) {
|
|
61
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
61
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _result_{};
|
|
62
62
|
|
|
63
63
|
_errorCode__ = (static_cast<const IWebBrowserExt*>(_implementation__))->Languages(_result_);
|
|
64
64
|
|
|
65
65
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
66
66
|
result.Set(true);
|
|
@@ -71,19 +71,22 @@ namespace Exchange {
|
|
|
71
71
|
_result_->Release();
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _params_{};
|
|
76
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _params_{};
|
|
77
77
|
std::list<string> _paramsElements_{};
|
|
78
78
|
auto _paramsIterator_ = params.Elements();
|
|
79
79
|
while (_paramsIterator_.Next() == true) { _paramsElements_.push_back(_paramsIterator_.Current()); }
|
|
80
|
-
using _paramsIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>>;
|
|
81
|
-
_params_ = Core::ServiceType<_paramsIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>>(std::move(_paramsElements_));
|
|
80
|
+
using _paramsIteratorImplType_ = ::Thunder::RPC::IteratorType<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>>;
|
|
81
|
+
_params_ = Core::ServiceType<_paramsIteratorImplType_>::Create<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>>(std::move(_paramsElements_));
|
|
82
82
|
ASSERT(_params_ != nullptr);
|
|
83
83
|
|
|
84
|
-
_errorCode__ = _implementation__->Languages(static_cast<::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* const&>(_params_));
|
|
84
|
+
_errorCode__ = _implementation__->Languages(static_cast<::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* const&>(_params_));
|
|
85
|
+
if (_params_ != nullptr) {
|
|
86
|
+
_params_->Release();
|
|
87
|
+
}
|
|
85
88
|
|
|
86
89
|
result.Null(true);
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
return (_errorCode__);
|
|
@@ -159,11 +159,11 @@ namespace Exchange {
|
|
|
159
159
|
// Property: 'configs' - Provides configs list (r/o)
|
|
160
160
|
_module__.PluginHost::JSONRPC::template Register<void, Core::JSON::ArrayType<Core::JSON::String>>(_T("configs"),
|
|
161
161
|
[_implementation__](Core::JSON::ArrayType<Core::JSON::String>& result) -> uint32_t {
|
|
162
162
|
uint32_t _errorCode__ = Core::ERROR_NONE;
|
|
163
163
|
|
|
164
|
-
::Thunder::RPC::IIteratorType<string, RPC::ID_STRINGITERATOR>* _result_{};
|
|
164
|
+
::Thunder::RPC::IIteratorType<string, ::Thunder::RPC::ID_STRINGITERATOR>* _result_{};
|
|
165
165
|
|
|
166
166
|
_errorCode__ = _implementation__->Configs(_result_);
|
|
167
167
|
|
|
168
168
|
if (_errorCode__ == Core::ERROR_NONE) {
|
|
169
169
|
result.Set(true);
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
// C++ types for MessageControl API.
|
|
2
|
-
// Generated automatically from 'IMessageControl.h'. DO NOT EDIT.
|
|
3
|
-
|
|
4
|
-
// Note: This code is inherently not thread safe. If required, proper synchronisation must be added.
|
|
5
|
-
|
|
6
|
-
#pragma once
|
|
7
|
-
|
|
8
|
-
#include <core/JSON.h>
|
|
9
|
-
#include <interfaces/IMessageControl.h>
|
|
10
|
-
|
|
11
|
-
namespace Thunder {
|
|
12
|
-
|
|
13
|
-
namespace JsonData {
|
|
14
|
-
|
|
15
|
-
PUSH_WARNING(DISABLE_WARNING_TYPE_LIMITS)
|
|
16
|
-
|
|
17
|
-
namespace MessageControl {
|
|
18
|
-
|
|
19
|
-
// Common classes
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
class ControlInfo : public Core::JSON::Container {
|
|
23
|
-
public:
|
|
24
|
-
ControlInfo()
|
|
25
|
-
: Core::JSON::Container()
|
|
26
|
-
{
|
|
27
|
-
_Init();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
ControlInfo(const ControlInfo& _other)
|
|
31
|
-
: Core::JSON::Container()
|
|
32
|
-
, Type(_other.Type)
|
|
33
|
-
, Category(_other.Category)
|
|
34
|
-
, Module(_other.Module)
|
|
35
|
-
, Enabled(_other.Enabled)
|
|
36
|
-
{
|
|
37
|
-
_Init();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
ControlInfo(ControlInfo&& _other) noexcept
|
|
41
|
-
: Core::JSON::Container()
|
|
42
|
-
, Type(std::move(_other.Type))
|
|
43
|
-
, Category(std::move(_other.Category))
|
|
44
|
-
, Module(std::move(_other.Module))
|
|
45
|
-
, Enabled(std::move(_other.Enabled))
|
|
46
|
-
{
|
|
47
|
-
_Init();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
ControlInfo(const Exchange::IMessageControl::Control& _other)
|
|
51
|
-
: Core::JSON::Container()
|
|
52
|
-
{
|
|
53
|
-
Type = _other.type;
|
|
54
|
-
Category = _other.category;
|
|
55
|
-
Module = _other.module;
|
|
56
|
-
Enabled = _other.enabled;
|
|
57
|
-
_Init();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
ControlInfo& operator=(const ControlInfo& _rhs)
|
|
61
|
-
{
|
|
62
|
-
Type = _rhs.Type;
|
|
63
|
-
Category = _rhs.Category;
|
|
64
|
-
Module = _rhs.Module;
|
|
65
|
-
Enabled = _rhs.Enabled;
|
|
66
|
-
return (*this);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
ControlInfo& operator=(ControlInfo&& _rhs) noexcept
|
|
70
|
-
{
|
|
71
|
-
Type = std::move(_rhs.Type);
|
|
72
|
-
Category = std::move(_rhs.Category);
|
|
73
|
-
Module = std::move(_rhs.Module);
|
|
74
|
-
Enabled = std::move(_rhs.Enabled);
|
|
75
|
-
return (*this);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
ControlInfo& operator=(const Exchange::IMessageControl::Control& _rhs)
|
|
79
|
-
{
|
|
80
|
-
Type = _rhs.type;
|
|
81
|
-
Category = _rhs.category;
|
|
82
|
-
Module = _rhs.module;
|
|
83
|
-
Enabled = _rhs.enabled;
|
|
84
|
-
return (*this);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
operator Exchange::IMessageControl::Control() const
|
|
88
|
-
{
|
|
89
|
-
Exchange::IMessageControl::Control _value{};
|
|
90
|
-
_value.type = Type;
|
|
91
|
-
_value.category = Category;
|
|
92
|
-
_value.module = Module;
|
|
93
|
-
_value.enabled = Enabled;
|
|
94
|
-
return (_value);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
~ControlInfo() = default;
|
|
98
|
-
|
|
99
|
-
public:
|
|
100
|
-
bool IsDataValid() const
|
|
101
|
-
{
|
|
102
|
-
return ((Type.IsSet() == true) && (Category.IsSet() == true) && (Module.IsSet() == true) && (Enabled.IsSet() == true));
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
private:
|
|
106
|
-
void _Init()
|
|
107
|
-
{
|
|
108
|
-
Add(_T("type"), &Type);
|
|
109
|
-
Add(_T("category"), &Category);
|
|
110
|
-
Add(_T("module"), &Module);
|
|
111
|
-
Add(_T("enabled"), &Enabled);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
public:
|
|
115
|
-
Core::JSON::EnumType<Exchange::IMessageControl::messagetype> Type; // Type of message
|
|
116
|
-
Core::JSON::String Category; // Name of the message category
|
|
117
|
-
Core::JSON::String Module; // Name of the module the message is originating from
|
|
118
|
-
Core::JSON::Boolean Enabled; // Denotes if the control is enabled (true) or disabled (false)
|
|
119
|
-
}; // class ControlInfo
|
|
120
|
-
|
|
121
|
-
// Method params/result classes
|
|
122
|
-
//
|
|
123
|
-
|
|
124
|
-
} // namespace MessageControl
|
|
125
|
-
|
|
126
|
-
POP_WARNING()
|
|
127
|
-
|
|
128
|
-
} // namespace JsonData
|
|
129
|
-
|
|
130
|
-
// Enum conversion handlers
|
|
131
|
-
ENUM_CONVERSION_HANDLER(Exchange::IMessageControl::messagetype)
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
@@ -74,153 +74,10 @@ namespace JsonData {
|
|
|
74
74
|
}; // class ResourceParamsInfo
|
|
75
75
|
|
|
76
76
|
// Method params/result classes
|
|
77
77
|
//
|
|
78
78
|
|
|
79
|
-
class InfoData : public Core::JSON::Container {
|
|
80
|
-
public:
|
|
81
|
-
InfoData()
|
|
82
|
-
: Core::JSON::Container()
|
|
83
|
-
{
|
|
84
|
-
_Init();
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
InfoData(const InfoData& _other)
|
|
88
|
-
: Core::JSON::Container()
|
|
89
|
-
, Base(_other.Base)
|
|
90
|
-
, Extended(_other.Extended)
|
|
91
|
-
, Type(_other.Type)
|
|
92
|
-
, Fraction(_other.Fraction)
|
|
93
|
-
, Manufacturer(_other.Manufacturer)
|
|
94
|
-
, Model(_other.Model)
|
|
95
|
-
, Communication(_other.Communication)
|
|
96
|
-
, Metadata(_other.Metadata)
|
|
97
|
-
{
|
|
98
|
-
_Init();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
InfoData(InfoData&& _other) noexcept
|
|
102
|
-
: Core::JSON::Container()
|
|
103
|
-
, Base(std::move(_other.Base))
|
|
104
|
-
, Extended(std::move(_other.Extended))
|
|
105
|
-
, Type(std::move(_other.Type))
|
|
106
|
-
, Fraction(std::move(_other.Fraction))
|
|
107
|
-
, Manufacturer(std::move(_other.Manufacturer))
|
|
108
|
-
, Model(std::move(_other.Model))
|
|
109
|
-
, Communication(std::move(_other.Communication))
|
|
110
|
-
, Metadata(std::move(_other.Metadata))
|
|
111
|
-
{
|
|
112
|
-
_Init();
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
InfoData(const Exchange::IValuePoint::Info& _other)
|
|
116
|
-
: Core::JSON::Container()
|
|
117
|
-
{
|
|
118
|
-
Base = _other.base;
|
|
119
|
-
Extended = _other.extended;
|
|
120
|
-
Type = _other.type;
|
|
121
|
-
Fraction = _other.fraction;
|
|
122
|
-
Manufacturer = _other.manufacturer;
|
|
123
|
-
Model = _other.model;
|
|
124
|
-
Communication = _other.communication;
|
|
125
|
-
if (_other.metadata.IsSet() == true) {
|
|
126
|
-
Metadata = _other.metadata.Value();
|
|
127
|
-
}
|
|
128
|
-
_Init();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
InfoData& operator=(const InfoData& _rhs)
|
|
132
|
-
{
|
|
133
|
-
Base = _rhs.Base;
|
|
134
|
-
Extended = _rhs.Extended;
|
|
135
|
-
Type = _rhs.Type;
|
|
136
|
-
Fraction = _rhs.Fraction;
|
|
137
|
-
Manufacturer = _rhs.Manufacturer;
|
|
138
|
-
Model = _rhs.Model;
|
|
139
|
-
Communication = _rhs.Communication;
|
|
140
|
-
if (_rhs.Metadata.IsSet() == true) {
|
|
141
|
-
Metadata = _rhs.Metadata;
|
|
142
|
-
}
|
|
143
|
-
return (*this);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
InfoData& operator=(InfoData&& _rhs) noexcept
|
|
147
|
-
{
|
|
148
|
-
Base = std::move(_rhs.Base);
|
|
149
|
-
Extended = std::move(_rhs.Extended);
|
|
150
|
-
Type = std::move(_rhs.Type);
|
|
151
|
-
Fraction = std::move(_rhs.Fraction);
|
|
152
|
-
Manufacturer = std::move(_rhs.Manufacturer);
|
|
153
|
-
Model = std::move(_rhs.Model);
|
|
154
|
-
Communication = std::move(_rhs.Communication);
|
|
155
|
-
Metadata = std::move(_rhs.Metadata);
|
|
156
|
-
return (*this);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
InfoData& operator=(const Exchange::IValuePoint::Info& _rhs)
|
|
160
|
-
{
|
|
161
|
-
Base = _rhs.base;
|
|
162
|
-
Extended = _rhs.extended;
|
|
163
|
-
Type = _rhs.type;
|
|
164
|
-
Fraction = _rhs.fraction;
|
|
165
|
-
Manufacturer = _rhs.manufacturer;
|
|
166
|
-
Model = _rhs.model;
|
|
167
|
-
Communication = _rhs.communication;
|
|
168
|
-
if (_rhs.metadata.IsSet() == true) {
|
|
169
|
-
Metadata = _rhs.metadata.Value();
|
|
170
|
-
}
|
|
171
|
-
return (*this);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
operator Exchange::IValuePoint::Info() const
|
|
175
|
-
{
|
|
176
|
-
Exchange::IValuePoint::Info _value{};
|
|
177
|
-
_value.base = Base;
|
|
178
|
-
_value.extended = Extended;
|
|
179
|
-
_value.type = Type;
|
|
180
|
-
_value.fraction = Fraction;
|
|
181
|
-
_value.manufacturer = Manufacturer;
|
|
182
|
-
_value.model = Model;
|
|
183
|
-
_value.communication = Communication;
|
|
184
|
-
if (Metadata.IsSet() == true) {
|
|
185
|
-
_value.metadata = Metadata;
|
|
186
|
-
}
|
|
187
|
-
return (_value);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
~InfoData() = default;
|
|
191
|
-
|
|
192
|
-
public:
|
|
193
|
-
bool IsDataValid() const
|
|
194
|
-
{
|
|
195
|
-
return ((Base.IsSet() == true) && (Extended.IsSet() == true) && (Type.IsSet() == true) && (Fraction.IsSet() == true) && (Manufacturer.IsSet() == true) && (Model.IsSet() == true) && (Communication.IsSet() == true));
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
private:
|
|
199
|
-
void _Init()
|
|
200
|
-
{
|
|
201
|
-
Add(_T("base"), &Base);
|
|
202
|
-
Add(_T("extended"), &Extended);
|
|
203
|
-
Add(_T("type"), &Type);
|
|
204
|
-
Add(_T("fraction"), &Fraction);
|
|
205
|
-
Add(_T("manufacturer"), &Manufacturer);
|
|
206
|
-
Add(_T("model"), &Model);
|
|
207
|
-
Add(_T("communication"), &Communication);
|
|
208
|
-
Add(_T("metadata"), &Metadata);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
public:
|
|
212
|
-
Core::JSON::EnumType<Exchange::IValuePoint::basic> Base; // There most be more than meets the eye, report it as a JSON string.
|
|
213
|
-
Core::JSON::EnumType<Exchange::IValuePoint::specific> Extended; // There most be more than meets the eye, report it as a JSON string.
|
|
214
|
-
Core::JSON::EnumType<Exchange::IValuePoint::dimension> Type; // There most be more than meets the eye, report it as a JSON string.
|
|
215
|
-
Core::JSON::DecUInt8 Fraction; // There most be more than meets the eye, report it as a JSON string.
|
|
216
|
-
Core::JSON::String Manufacturer; // There most be more than meets the eye, report it as a JSON string.
|
|
217
|
-
Core::JSON::String Model; // There most be more than meets the eye, report it as a JSON string.
|
|
218
|
-
Core::JSON::EnumType<Exchange::IValuePoint::protocol> Communication; // There most be more than meets the eye, report it as a JSON string.
|
|
219
|
-
Core::JSON::String Metadata; // There most be more than meets the eye, report it as a JSON string.
|
|
220
|
-
}; // class InfoData
|
|
221
|
-
|
|
222
79
|
class ValueData : public Core::JSON::Container {
|
|
223
80
|
public:
|
|
224
81
|
ValueData()
|
|
225
82
|
: Core::JSON::Container()
|
|
226
83
|
{
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// Enumeration code for MessageControl API.
|
|
2
|
-
// Generated automatically from 'IMessageControl.h'.
|
|
3
|
-
|
|
4
|
-
#include <core/Enumerate.h>
|
|
5
|
-
|
|
6
|
-
#include "definitions.h"
|
|
7
|
-
#include <interfaces/IMessageControl.h>
|
|
8
|
-
#include "JsonData_MessageControl.h"
|
|
9
|
-
|
|
10
|
-
namespace Thunder {
|
|
11
|
-
|
|
12
|
-
ENUM_CONVERSION_BEGIN(Exchange::IMessageControl::messagetype)
|
|
13
|
-
{ Exchange::IMessageControl::messagetype::INVALID, _TXT("Invalid") },
|
|
14
|
-
{ Exchange::IMessageControl::messagetype::TRACING, _TXT("Tracing") },
|
|
15
|
-
{ Exchange::IMessageControl::messagetype::LOGGING, _TXT("Logging") },
|
|
16
|
-
{ Exchange::IMessageControl::messagetype::REPORTING, _TXT("Reporting") },
|
|
17
|
-
{ Exchange::IMessageControl::messagetype::OPERATIONAL_STREAM, _TXT("OperationalStream") },
|
|
18
|
-
{ Exchange::IMessageControl::messagetype::ASSERT, _TXT("Assert") },
|
|
19
|
-
{ Exchange::IMessageControl::messagetype::TELEMETRY, _TXT("Telemetry") },
|
|
20
|
-
ENUM_CONVERSION_END(Exchange::IMessageControl::messagetype)
|
|
21
|
-
|
|
22
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// IMessageControl API
|
|
2
|
-
// Generated automatically. DO NOT EDIT.
|
|
3
|
-
|
|
4
|
-
#pragma once
|
|
5
|
-
|
|
6
|
-
#include "JsonData_MessageControl.h"
|
|
7
|
-
#include "JMessageControl.h"
|