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