1e0dac50fSopenharmony_ci/* 2e0dac50fSopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3e0dac50fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4e0dac50fSopenharmony_ci * you may not use this file except in compliance with the License. 5e0dac50fSopenharmony_ci * You may obtain a copy of the License at 6e0dac50fSopenharmony_ci * 7e0dac50fSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8e0dac50fSopenharmony_ci * 9e0dac50fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10e0dac50fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11e0dac50fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12e0dac50fSopenharmony_ci * See the License for the specific language governing permissions and 13e0dac50fSopenharmony_ci * limitations under the License. 14e0dac50fSopenharmony_ci */ 15e0dac50fSopenharmony_ci 16e0dac50fSopenharmony_ci#ifndef OHOS_STATIC_CALL_H 17e0dac50fSopenharmony_ci#define OHOS_STATIC_CALL_H 18e0dac50fSopenharmony_ci 19e0dac50fSopenharmony_ci#include <iremote_object.h> 20e0dac50fSopenharmony_ci#include "singleton_delegator.h" 21e0dac50fSopenharmony_ci#include "wm_single_instance.h" 22e0dac50fSopenharmony_ci#include "window.h" 23e0dac50fSopenharmony_ci#include "window_option.h" 24e0dac50fSopenharmony_ci 25e0dac50fSopenharmony_cinamespace OHOS { 26e0dac50fSopenharmony_cinamespace Rosen { 27e0dac50fSopenharmony_ciclass ISession; 28e0dac50fSopenharmony_ciclass StaticCall { 29e0dac50fSopenharmony_ciWM_DECLARE_SINGLE_INSTANCE_BASE(StaticCall); 30e0dac50fSopenharmony_cipublic: 31e0dac50fSopenharmony_ci virtual sptr<Window> CreateWindow(const std::string& windowName, 32e0dac50fSopenharmony_ci sptr<WindowOption>& option, std::shared_ptr<AbilityRuntime::Context> context = nullptr); 33e0dac50fSopenharmony_ci virtual sptr<Window> CreateWindow(sptr<WindowOption>& option, std::shared_ptr<AbilityRuntime::Context> context, 34e0dac50fSopenharmony_ci const sptr<IRemoteObject>& iSession, const std::string& identityToken = ""); 35e0dac50fSopenharmony_ci virtual std::vector<sptr<Window>> GetSubWindow(uint32_t parentId); 36e0dac50fSopenharmony_ci 37e0dac50fSopenharmony_ciprotected: 38e0dac50fSopenharmony_ci StaticCall() = default; 39e0dac50fSopenharmony_ci 40e0dac50fSopenharmony_ciprivate: 41e0dac50fSopenharmony_ci static inline SingletonDelegator<StaticCall> delegator_; 42e0dac50fSopenharmony_ci}; 43e0dac50fSopenharmony_ci} // namespace ROSEN 44e0dac50fSopenharmony_ci} // namespace OHOS 45e0dac50fSopenharmony_ci 46e0dac50fSopenharmony_ci#endif // OHOS_STATIC_CALL_H