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 INTENTION_BOOMERANG_CLIENT_H 17 #define INTENTION_BOOMERANG_CLIENT_H 18 19 #include <map> 20 21 #include "nocopyable.h" 22 23 #include "i_tunnel_client.h" 24 #include "boomerang_callback.h" 25 26 namespace OHOS { 27 namespace Msdp { 28 namespace DeviceStatus { 29 class BoomerangClient final { 30 public: 31 BoomerangClient() = default; 32 ~BoomerangClient() = default; 33 DISALLOW_COPY_AND_MOVE(BoomerangClient); 34 35 int32_t SubscribeCallback(ITunnelClient &tunnel, BoomerangType type, std::string bundleName, 36 sptr<IRemoteBoomerangCallback> callback); 37 int32_t UnsubscribeCallback(ITunnelClient &tunnel, BoomerangType type, std::string bundleName, 38 sptr<IRemoteBoomerangCallback> callback); 39 int32_t NotifyMetadataBindingEvent(ITunnelClient &tunnel, std::string bundleName, 40 sptr<IRemoteBoomerangCallback> callback); 41 int32_t SubmitMetadata(ITunnelClient &tunnel, std::string metadata); 42 int32_t BoomerangEncodeImage(ITunnelClient &tunnel, std::shared_ptr<Media::PixelMap> pixelMap, 43 std::string matedata, sptr<IRemoteBoomerangCallback> callback); 44 int32_t BoomerangDecodeImage(ITunnelClient &tunnel, std::shared_ptr<Media::PixelMap> pixelMap, 45 sptr<IRemoteBoomerangCallback> callback); 46 47 private: 48 std::mutex mtx_; 49 std::map<BoomerangType, int32_t> typeMap_; 50 }; 51 } // namespace DeviceStatus 52 } // namespace Msdp 53 } // namespace OHOS 54 #endif // INTENTION_BOOMERANG_CLIENT_H