Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestAutomationPlugin development: #305

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
};
}
}