Skip to content

Commit

Permalink
TestAutomationPlugin development:
Browse files Browse the repository at this point in the history
  • Loading branch information
volkan-aslan committed Nov 22, 2023
1 parent 1807c13 commit 50fadb5
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
77 changes: 77 additions & 0 deletions interfaces/ITestAutomationTools.h
Original file line number Diff line number Diff line change
@@ -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;
};
}
}
6 changes: 5 additions & 1 deletion interfaces/Ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
}
}

0 comments on commit 50fadb5

Please sign in to comment.