1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "dsched_sync_e2e_mock.h" 17 18 using namespace std; 19 using namespace OHOS; 20 using namespace OHOS::DistributedSchedule; 21 PushAndPullData()22bool DmsKvSyncE2E::PushAndPullData() 23 { 24 if (IDmsKvSyncE2E::dmsKvMock == nullptr) { 25 return false; 26 } 27 return IDmsKvSyncE2E::dmsKvMock->PushAndPullData(); 28 } 29 PushAndPullData(const std::string & networkId)30bool DmsKvSyncE2E::PushAndPullData(const std::string &networkId) 31 { 32 if (IDmsKvSyncE2E::dmsKvMock == nullptr) { 33 return false; 34 } 35 return IDmsKvSyncE2E::dmsKvMock->PushAndPullData(networkId); 36 } 37 CheckDeviceCfg()38bool DmsKvSyncE2E::CheckDeviceCfg() 39 { 40 if (IDmsKvSyncE2E::dmsKvMock == nullptr) { 41 return false; 42 } 43 return IDmsKvSyncE2E::dmsKvMock->CheckDeviceCfg(); 44 } 45 CheckCtrlRule()46bool DmsKvSyncE2E::CheckCtrlRule() 47 { 48 if (IDmsKvSyncE2E::dmsKvMock == nullptr) { 49 return false; 50 } 51 return IDmsKvSyncE2E::dmsKvMock->CheckCtrlRule(); 52 } 53 CheckBundleContinueConfig(const std::string & bundleName)54bool DmsKvSyncE2E::CheckBundleContinueConfig(const std::string &bundleName) 55 { 56 if (IDmsKvSyncE2E::dmsKvMock == nullptr) { 57 return false; 58 } 59 return IDmsKvSyncE2E::dmsKvMock->CheckBundleContinueConfig(bundleName); 60 } 61