• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 FRAMEWORKS_ETS_ANI_COMMON_H
17 #define FRAMEWORKS_ETS_ANI_COMMON_H
18 
19 #include "ability_context.h"
20 #include "ani.h"
21 #include "ani_base_context.h"
22 #include "ani_request_base.h"
23 #include "ui_content.h"
24 #include "ui_extension_context.h"
25 
26 namespace OHOS {
27 namespace Security {
28 namespace AccessToken {
29 bool ExecuteAsyncCallback(ani_env* env, ani_object callback, ani_object error, ani_object result);
30 OHOS::Ace::UIContent* GetUIContent(const std::shared_ptr<OHOS::AbilityRuntime::Context> stageContext);
31 void CreateUIExtensionMainThread(std::shared_ptr<RequestAsyncContextBase> asyncContext,
32     const OHOS::AAFwk::Want& want, const OHOS::Ace::ModalUIExtensionCallbacks& uiExtensionCallbacks,
33     const std::shared_ptr<UIExtensionCallback> uiExtCallback);
34 void CloseModalUIExtensionMainThread(std::shared_ptr<RequestAsyncContextBase> asyncContext, int32_t sessionId);
35 void CreateUIExtension(
36     const OHOS::AAFwk::Want& want,
37     std::shared_ptr<RequestAsyncContextBase> asyncContext,
38     std::shared_ptr<RequestInstanceControl> controller
39 );
40 } // namespace AccessToken
41 } // namespace Security
42 } // namespace OHOS
43 #endif /* FRAMEWORKS_ETS_ANI_COMMON_H */