diff --git a/interfaces/ITestAutomationTools.h b/interfaces/ITestAutomationTools.h new file mode 100644 index 00000000..9b56f9b6 --- /dev/null +++ b/interfaces/ITestAutomationTools.h @@ -0,0 +1,77 @@ +/* + * If not stated otherwise in this file or this component's LICENSE file the + * following copyright and licenses apply: + * + * Copyright 2020 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 WPEFramework { +namespace Exchange { + + // @json + struct EXTERNAL ITestAutomationTools : virtual public Core::IUnknown { + enum { ID = ID_TESTAUTOMATIONTOOLS }; + + // @event + struct EXTERNAL INotification : virtual public Core::IUnknown { + enum { ID = ID_TESTAUTOMATIONTOOLS_NOTIFICATION }; + + ~INotification() override = default; + + virtual void TestNotification() = 0; + + }; + + ~ITestAutomationTools() override = default; + + virtual void Register(ITestAutomationTools::INotification* sink) = 0; + virtual void Unregister(const ITestAutomationTools::INotification* sink) = 0; + + // @method + // @brief Allocates Memory as given size of MB + // @retval ERROR_GENERAL Failed to allocate memory + virtual Core::hresult AllocateMemory(const uint32_t size) = 0; + + + // @method + // @brief Frees the allocated memory + // @retval ERROR_GENERAL Failed to free allocated memory + virtual Core::hresult FreeAllocatedMemory() = 0; + + + // @method + // @brief Validates big string over proxy-stub with given length of KB + // @retval ERROR_GENERAL Failed to verify + virtual Core::hresult TestBigString(const uint32_t length) = 0; + }; + + struct EXTERNAL ITestAutomationToolsInternal : virtual public Core::IUnknown { + enum { ID = ID_TESTAUTOMATIONTOOLSINTERNAL }; + + + ~ITestAutomationToolsInternal() override = default; + + virtual Core::hresult IncreaseMemory(uint32_t memorySize) = 0; + + virtual Core::hresult FreeMemory() = 0; + + virtual Core::hresult BigStringTest(const string& testString /* @restrict: (4M-1) */) = 0; + }; +} +} \ No newline at end of file diff --git a/interfaces/Ids.h b/interfaces/Ids.h index 0d97ae4d..6f3d4635 100644 --- a/interfaces/Ids.h +++ b/interfaces/Ids.h @@ -372,7 +372,11 @@ namespace Exchange { ID_DNS_SERVER = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x4E0, ID_DNS_ZONE = ID_DNS_SERVER + 1, - ID_DNS_RECORD = ID_DNS_SERVER + 2 + ID_DNS_RECORD = ID_DNS_SERVER + 2, + + ID_TESTAUTOMATIONTOOLS = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x4F0, + ID_TESTAUTOMATIONTOOLS_NOTIFICATION = ID_TESTAUTOMATIONTOOLS + 1, + ID_TESTAUTOMATIONTOOLSINTERNAL = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x500 }; } }