180922886Sopenharmony_ci/* 280922886Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 380922886Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 480922886Sopenharmony_ci * you may not use this file except in compliance with the License. 580922886Sopenharmony_ci * You may obtain a copy of the License at 680922886Sopenharmony_ci * 780922886Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 880922886Sopenharmony_ci * 980922886Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1080922886Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1180922886Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1280922886Sopenharmony_ci * See the License for the specific language governing permissions and 1380922886Sopenharmony_ci * limitations under the License. 1480922886Sopenharmony_ci */ 1580922886Sopenharmony_ci 1680922886Sopenharmony_ci#ifndef ABILITY_DYNAMIC_INSIGHT_H 1780922886Sopenharmony_ci#define ABILITY_DYNAMIC_INSIGHT_H 1880922886Sopenharmony_ci 1980922886Sopenharmony_ci#include "insight_intent_execute_param.h" 2080922886Sopenharmony_ci 2180922886Sopenharmony_cinamespace OHOS::AVSession { 2280922886Sopenharmony_ciclass InsightAdapter { 2380922886Sopenharmony_cipublic: 2480922886Sopenharmony_ci static InsightAdapter& GetInsightAdapterInstance(); 2580922886Sopenharmony_ci 2680922886Sopenharmony_ci ~InsightAdapter(); 2780922886Sopenharmony_ci 2880922886Sopenharmony_ci __attribute__((no_sanitize("cfi"))) bool IsSupportPlayIntent(const std::string& bundleName, 2980922886Sopenharmony_ci std::string& supportModule, std::string& profile); 3080922886Sopenharmony_ci 3180922886Sopenharmony_ci bool GetPlayIntentParam(const std::string& bundleName, const std::string& assetId, 3280922886Sopenharmony_ci AppExecFwk::InsightIntentExecuteParam &executeParam); 3380922886Sopenharmony_ci 3480922886Sopenharmony_ci int32_t StartAVPlayback(AppExecFwk::InsightIntentExecuteParam &executeParam); 3580922886Sopenharmony_ci 3680922886Sopenharmony_ciprivate: 3780922886Sopenharmony_ci InsightAdapter(); 3880922886Sopenharmony_ci 3980922886Sopenharmony_ci bool CheckBundleSupport(std::string& profile); 4080922886Sopenharmony_ci 4180922886Sopenharmony_ci const int32_t getBundleInfoWithHapModule = 0x00000002; 4280922886Sopenharmony_ci 4380922886Sopenharmony_ci const int32_t startUserId = 100; 4480922886Sopenharmony_ci 4580922886Sopenharmony_ci const int32_t interfaceType = 9; 4680922886Sopenharmony_ci 4780922886Sopenharmony_ci const std::string PLAY_MUSICLIST = "PlayMusicList"; 4880922886Sopenharmony_ci 4980922886Sopenharmony_ci const std::string PLAY_AUDIO = "PlayAudio"; 5080922886Sopenharmony_ci}; 5180922886Sopenharmony_ci 5280922886Sopenharmony_ci} 5380922886Sopenharmony_ci#endif // ABILITY_DYNAMIC_INSIGHT_H 5480922886Sopenharmony_ci 55