From 92f732823d0dd8ad7a6cd983083d9c1aabef8cca Mon Sep 17 00:00:00 2001 From: smanes0213 Date: Mon, 20 Apr 2026 14:02:24 +0530 Subject: [PATCH 1/2] Add ITestPlugin COM-RPC interface for test support lib --- qa_interfaces/ITestPlugin.h | 45 +++++++++++++++++++++++++++++++++++++ qa_interfaces/QAIds.h | 3 ++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 qa_interfaces/ITestPlugin.h diff --git a/qa_interfaces/ITestPlugin.h b/qa_interfaces/ITestPlugin.h new file mode 100644 index 00000000..42908776 --- /dev/null +++ b/qa_interfaces/ITestPlugin.h @@ -0,0 +1,45 @@ +/* + * If not stated otherwise in this file or this component's LICENSE file the + * following copyright and licenses apply: + * + * Copyright 2024 Metrological + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "Module.h" + +namespace Thunder { +namespace QualityAssurance { + + // @json 1.0.0 + struct EXTERNAL ITestPlugin : virtual public Core::IUnknown { + enum { ID = ID_TESTPLUGIN }; + + ~ITestPlugin() override = default; + + // @brief Returns the input string unchanged + // @param input The input string to echo back + // @param output The echoed output string + virtual uint32_t Echo(const string& input, string& output /* @out */) = 0; + + // @brief Returns a greeting message + // @param name The name to greet (empty defaults to "World") + // @param message The greeting message + virtual uint32_t Greet(const string& name, string& message /* @out */) = 0; + }; + +} // namespace QualityAssurance +} // namespace Thunder diff --git a/qa_interfaces/QAIds.h b/qa_interfaces/QAIds.h index 08173dc0..11c3e990 100644 --- a/qa_interfaces/QAIds.h +++ b/qa_interfaces/QAIds.h @@ -74,8 +74,9 @@ namespace QualityAssurance { ID_TESTKEEP = ID_TESTTEXTOPTIONS + 4, ID_TESTKEEP_NOTIFICATION = ID_TESTTEXTOPTIONS + 5, ID_TESTCUSTOM = ID_TESTTEXTOPTIONS + 6, - ID_TESTCUSTOM_NOTIFICATION = ID_TESTTEXTOPTIONS + 7 + ID_TESTCUSTOM_NOTIFICATION = ID_TESTTEXTOPTIONS + 7, + ID_TESTPLUGIN = RPC::IDS::ID_EXTERNAL_QA_INTERFACE_OFFSET + 0x060 }; } } From 417bf99c9061986f6807046f644187a77fe0e1fe Mon Sep 17 00:00:00 2001 From: smanes0213 Date: Tue, 21 Apr 2026 10:35:36 +0530 Subject: [PATCH 2/2] Add event to the TestPlugin Interface file --- qa_interfaces/ITestPlugin.h | 17 +++++++++++++++-- qa_interfaces/QAIds.h | 3 ++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/qa_interfaces/ITestPlugin.h b/qa_interfaces/ITestPlugin.h index 42908776..d529cca3 100644 --- a/qa_interfaces/ITestPlugin.h +++ b/qa_interfaces/ITestPlugin.h @@ -28,17 +28,30 @@ namespace QualityAssurance { struct EXTERNAL ITestPlugin : virtual public Core::IUnknown { enum { ID = ID_TESTPLUGIN }; + // @event + struct EXTERNAL INotification : virtual public Core::IUnknown { + enum { ID = ID_TESTPLUGIN_NOTIFICATION }; + ~INotification() override = default; + + // @brief Signals that a greeting was generated + // @param message The greeting message + virtual void OnGreeting(const string& message) = 0; + }; + ~ITestPlugin() override = default; + virtual Core::hresult Register(ITestPlugin::INotification* notification) = 0; + virtual Core::hresult Unregister(ITestPlugin::INotification* notification) = 0; + // @brief Returns the input string unchanged // @param input The input string to echo back // @param output The echoed output string - virtual uint32_t Echo(const string& input, string& output /* @out */) = 0; + virtual Core::hresult Echo(const string& input, string& output /* @out */) = 0; // @brief Returns a greeting message // @param name The name to greet (empty defaults to "World") // @param message The greeting message - virtual uint32_t Greet(const string& name, string& message /* @out */) = 0; + virtual Core::hresult Greet(const string& name, string& message /* @out */) = 0; }; } // namespace QualityAssurance diff --git a/qa_interfaces/QAIds.h b/qa_interfaces/QAIds.h index 11c3e990..5f17cd3a 100644 --- a/qa_interfaces/QAIds.h +++ b/qa_interfaces/QAIds.h @@ -76,7 +76,8 @@ namespace QualityAssurance { ID_TESTCUSTOM = ID_TESTTEXTOPTIONS + 6, ID_TESTCUSTOM_NOTIFICATION = ID_TESTTEXTOPTIONS + 7, - ID_TESTPLUGIN = RPC::IDS::ID_EXTERNAL_QA_INTERFACE_OFFSET + 0x060 + ID_TESTPLUGIN = RPC::IDS::ID_EXTERNAL_QA_INTERFACE_OFFSET + 0x060, + ID_TESTPLUGIN_NOTIFICATION = ID_TESTPLUGIN + 1 }; } }