1 /* 2 * Copyright (c) 2020 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_ABILITYMGRSERVICE_SERVICE_H 17 #define OHOS_ABILITYMGRSERVICE_SERVICE_H 18 19 #include "nocopyable.h" 20 #include "service.h" 21 22 namespace OHOS { 23 class AbilityMgrService : public Service { 24 public: GetInstance()25 static AbilityMgrService *GetInstance() 26 { 27 static AbilityMgrService instance; 28 return &instance; 29 } 30 ~AbilityMgrService() = default; 31 const Identity *GetIdentity(); 32 33 private: 34 AbilityMgrService(); 35 static const char *GetServiceName(Service *service); 36 static BOOL ServiceInitialize(Service *service, Identity identity); 37 static TaskConfig GetServiceTaskConfig(Service *service); 38 static BOOL ServiceMessageHandle(Service *service, Request *request); 39 40 private: 41 Identity identity_; 42 DISALLOW_COPY_AND_MOVE(AbilityMgrService); 43 }; 44 } // namespace OHOS 45 #endif // OHOS_ABILITYMGRSERVICE_SERVICE_H 46