1 /* 2 * Copyright (c) 2024 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 OHOS_ROSEN_SCENE_SYSTEM_ABILITY_LISTENER_H 17 #define OHOS_ROSEN_SCENE_SYSTEM_ABILITY_LISTENER_H 18 #include "system_ability_status_change_stub.h" 19 20 namespace OHOS { 21 namespace Rosen { 22 struct SCBThreadInfo { 23 std::string scbUid_; 24 std::string scbPid_; 25 std::string scbTid_; 26 std::string ssmTid_; 27 std::string scbBundleName_; 28 std::string ssmThreadName_; 29 }; 30 31 class SceneSystemAbilityListener : public SystemAbilityStatusChangeStub { 32 public: SceneSystemAbilityListener(const SCBThreadInfo & info)33 SceneSystemAbilityListener(const SCBThreadInfo& info) : info_(info) {} 34 virtual ~SceneSystemAbilityListener() = default; 35 virtual void OnAddSystemAbility(int32_t systemAbilityId, const std::string& deviceId) override; OnRemoveSystemAbility(int32_t systemAbilityId,const std::string & deviceId)36 virtual void OnRemoveSystemAbility(int32_t systemAbilityId, const std::string& deviceId) override {} 37 38 private: 39 SCBThreadInfo info_; 40 }; 41 } // namespace Rosen 42 } // namespace OHOS 43 44 45 #endif 46 47