274 lines
11 KiB
C++
274 lines
11 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 "MediaMonitorMock.h"
|
|
#include "ILog.h"
|
|
// StatusCode MediaMonitorTest::GetProductInfo(AppGetProductInfo ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetProductInfo\n");
|
|
// StatusCode code = GetProductInfoTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetProductInfo(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetProductInfoTrace(AppGetProductInfo ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::GetProductInfoTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::GetDeviceAttr(AppGetDeviceAttr ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetDeviceAttr\n");
|
|
// StatusCode code = GetDeviceAttrTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetDeviceAttr(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetDeviceAttrTrace(AppGetDeviceAttr ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::GetDeviceAttrTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::GetMediaInfo(AppGetMediaInfo ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetMediaInfo\n");
|
|
// StatusCode code = GetMediaInfoTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetMediaInfo(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetMediaInfoTrace(AppGetMediaInfo ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::GetMediaInfoTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::GetSdCardInfo(AppGetSdCardInfo ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetSdCardInfo\n");
|
|
// StatusCode code = GetSdCardInfoTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetSdCardInfo(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetSdCardInfoTrace(AppGetSdCardInfo ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::GetSdCardInfoTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::GetBatteryInfo(AppGetBatteryInfo ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetBatteryInfo\n");
|
|
// StatusCode code = GetBatteryInfoTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetBatteryInfo(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetBatteryInfoTrace(AppGetBatteryInfo ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::GetBatteryInfoTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::GetParamValue(AppParamValue ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetParamValue\n");
|
|
// StatusCode code = GetParamValueTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetParamValue(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetParamValueTrace(AppParamValue ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::GetParamValueTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::GetCapability(AppGetCapability ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetCapability\n");
|
|
// StatusCode code = GetCapabilityTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetCapability(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetCapabilityTrace(AppGetCapability ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::GetCapabilityTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::GetLockVideoStatus(LockVideoStatus ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetLockVideoStatus\n");
|
|
// StatusCode code = GetLockVideoStatusTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetLockVideoStatus(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetLockVideoStatusTrace(LockVideoStatus ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::GetLockVideoStatusTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::GetStorageInfo(std::vector<AppGetStorageInfo> ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetStorageInfo\n");
|
|
// StatusCode code = GetStorageInfoTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetStorageInfo(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetStorageInfoTrace(std::vector<AppGetStorageInfo> ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::GetStorageInfoTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::GetStorageFileList(const AppGetFileInfo &fileInfo, std::vector<AppGetFileList> ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetStorageFileList\n");
|
|
// StatusCode code = GetStorageFileListTrace(fileInfo, param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetStorageFileList(fileInfo, param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetStorageFileListTrace(const AppGetFileInfo &fileInfo, std::vector<AppGetFileList> ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::GetStorageFileListTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::SetDateTime(const AppSetDateTime ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::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 VMediaMonitor::SetDateTime(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::SetDateTimeTrace(const AppSetDateTime ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::SetDateTimeTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::SetTimeZone(const unsigned int &zone)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::SetTimeZone = %u\n", zone);
|
|
// StatusCode code = SetTimeZoneTrace(zone);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::SetTimeZone(zone);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::SetTimeZoneTrace(const unsigned int &zone)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::SetTimeZoneTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::SetParamValue(const AppSetParamValue ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::SetParamValue\n");
|
|
// StatusCode code = SetParamValueTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::SetParamValue(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::SetParamValueTrace(const AppSetParamValue ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::SetParamValueTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::EnterRecorder(void)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::EnterRecorder\n");
|
|
// StatusCode code = EnterRecorderTrace();
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::EnterRecorder();
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::EnterRecorderTrace(void)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::EnterRecorderTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::AppPlayback(const PlayBackEvent &event)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::AppPlayback\n");
|
|
// StatusCode code = AppPlaybackTrace(event);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::AppPlayback(event);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::AppPlaybackTrace(const PlayBackEvent &event)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::AppPlaybackTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::UploadFile(AppUploadFile ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::UploadFile\n");
|
|
// StatusCode code = UploadFileTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::UploadFile(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::UploadFileTrace(AppUploadFile ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::UploadFileTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::GetThumbnail(AppGetThumbnail ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::GetThumbnail\n");
|
|
// StatusCode code = GetThumbnailTrace(param);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::GetThumbnail(param);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::GetThumbnailTrace(AppGetThumbnail ¶m)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::UploadFileTrace\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|
|
// StatusCode MediaMonitorTest::AppClientConnected(std::shared_ptr<VAppClient> &client)
|
|
// {
|
|
// LogInfo("MediaMonitorTest::AppClientConnected\n");
|
|
// StatusCode code = AppClientConnectedTrace(client);
|
|
// if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
// return VMediaMonitor::AppClientConnected(client);
|
|
// }
|
|
// return code;
|
|
// }
|
|
// StatusCode MediaMonitorTrace::AppClientConnectedTrace(std::shared_ptr<VAppClient> &client)
|
|
// {
|
|
// LogInfo("MediaMonitorTrace::AppClientConnected\n");
|
|
// return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
// }
|