mirror of
https://gitee.com/jiuyilian/embedded-framework.git
synced 2025-01-06 10:16:51 -05:00
134 lines
4.7 KiB
C++
134 lines
4.7 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 AppMonitorTrace::GetProductInfoTrace(AppGetProductInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTrace::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 AppMonitorTrace::GetDeviceAttrTrace(AppGetDeviceAttr ¶m)
|
|
{
|
|
LogInfo("AppMonitorTrace::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 AppMonitorTrace::GetMediaInfoTrace(AppGetMeidaInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTrace::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 AppMonitorTrace::GetSdCardInfoTrace(AppGetSdCardInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTrace::GetSdCardInfoTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
}
|
|
StatusCode AppMonitorTest::GetBatteryInfo(AppGetBatteryInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::GetBatteryInfo\n");
|
|
StatusCode code = GetBatteryInfoTrace(param);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return VAppMonitor::GetBatteryInfo(param);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode AppMonitorTrace::GetBatteryInfoTrace(AppGetBatteryInfo ¶m)
|
|
{
|
|
LogInfo("AppMonitorTrace::GetBatteryInfoTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
}
|
|
StatusCode AppMonitorTest::SetDateTime(AppSetDateTime ¶m)
|
|
{
|
|
LogInfo("AppMonitorTest::SetDateTime\n");
|
|
LogInfo("mYear = %u\n", param.mYear);
|
|
LogInfo("mMonth = %02u\n", param.mMonth);
|
|
LogInfo("mDay = %02u\n", param.mDay);
|
|
LogInfo("mHour = %02u\n", param.mHour);
|
|
LogInfo("mMinute = %02u\n", param.mMinute);
|
|
LogInfo("mSecond = %02u\n", param.mSecond);
|
|
StatusCode code = SetDateTimeTrace(param);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return VAppMonitor::SetDateTime(param);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode AppMonitorTrace::SetDateTimeTrace(AppSetDateTime ¶m)
|
|
{
|
|
LogInfo("AppMonitorTrace::SetDateTimeTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
}
|
|
StatusCode AppMonitorTest::SetTimeZone(const unsigned int &zone)
|
|
{
|
|
LogInfo("AppMonitorTest::SetTimeZone = %u\n", zone);
|
|
StatusCode code = SetTimeZoneTrace(zone);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return VAppMonitor::SetTimeZone(zone);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode AppMonitorTrace::SetTimeZoneTrace(const unsigned int &zone)
|
|
{
|
|
LogInfo("AppMonitorTrace::SetTimeZoneTrace\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 AppMonitorTrace::UploadFileTrace(AppUploadFile ¶m)
|
|
{
|
|
LogInfo("AppMonitorTrace::UploadFileTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
} |