86 lines
3.0 KiB
C++
86 lines
3.0 KiB
C++
/*
|
|
* Copyright (c) 2023 Fancy Code.
|
|
* 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.
|
|
*/
|
|
#include "AppMonitorMock.h"
|
|
#include "ILog.h"
|
|
StatusCode AppMonitorTest::GetProductInfo(AppGetProductInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::GetProductInfo\n");
|
|
StatusCode code = GetProductInfoTrace(param);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return VAppMonitor::GetProductInfo(param);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode AppMonitorTest::GetProductInfoTrace(AppGetProductInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::GetProductInfoTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
}
|
|
StatusCode AppMonitorTest::GetDeviceAttr(AppGetDeviceAttr ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::GetDeviceAttr\n");
|
|
StatusCode code = GetDeviceAttrTrace(param);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return VAppMonitor::GetDeviceAttr(param);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode AppMonitorTest::GetDeviceAttrTrace(AppGetDeviceAttr ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::GetDeviceAttrTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
}
|
|
StatusCode AppMonitorTest::GetMediaInfo(AppGetMeidaInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::GetMediaInfo\n");
|
|
StatusCode code = GetMediaInfoTrace(param);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return VAppMonitor::GetMediaInfo(param);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode AppMonitorTest::GetMediaInfoTrace(AppGetMeidaInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::GetMediaInfoTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
}
|
|
StatusCode AppMonitorTest::GetSdCardInfo(AppGetSdCardInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::GetSdCardInfo\n");
|
|
StatusCode code = GetSdCardInfoTrace(param);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return VAppMonitor::GetSdCardInfo(param);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode AppMonitorTest::GetSdCardInfoTrace(AppGetSdCardInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::GetSdCardInfoTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
}
|
|
StatusCode AppMonitorTest::UploadFile(AppUploadFile ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::UploadFile\n");
|
|
StatusCode code = UploadFileTrace(param);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return VAppMonitor::UploadFile(param);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode AppMonitorTest::UploadFileTrace(AppUploadFile ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::UploadFileTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
} |