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 #ifndef PASTEBOARD_DISTRIBUTED_DEVICE_PROFILE_CLIENT_MOCK_H 17 #define PASTEBOARD_DISTRIBUTED_DEVICE_PROFILE_CLIENT_MOCK_H 18 19 #include <gmock/gmock.h> 20 #include <string> 21 22 #include "distributed_device_profile_client.h" 23 24 namespace OHOS { 25 namespace DistributedDeviceProfile { 26 27 class PasteDistributedDeviceProfileClient { 28 public: 29 virtual ~PasteDistributedDeviceProfileClient() = default; 30 31 public: 32 virtual int32_t GetCharacteristicProfile(const std::string &deviceId, const std::string &serviceName, 33 const std::string &characteristicId, CharacteristicProfile &characteristicProfile) = 0; 34 virtual int32_t PutCharacteristicProfile(const CharacteristicProfile &characteristicProfile) = 0; 35 36 public: 37 static inline std::shared_ptr<PasteDistributedDeviceProfileClient> pasteDistributedDeviceProfileClient = nullptr; 38 }; 39 40 class DistributedDeviceProfileClientMock : public PasteDistributedDeviceProfileClient { 41 public: 42 MOCK_METHOD(int32_t, GetCharacteristicProfile, 43 (const std::string &, const std::string &, const std::string &, CharacteristicProfile &)); 44 MOCK_METHOD(int32_t, PutCharacteristicProfile, (const CharacteristicProfile &)); 45 }; 46 47 } // namespace DistributedDeviceProfile 48 } // namespace OHOS 49 50 #endif // PASTEBOARD_DISTRIBUTED_DEVICE_PROFILE_CLIENT_MOCK_H