1 /* 2 * Copyright (c) 2023 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_FORM_FWK_FORM_HOST_DELEGATE_INTERFACE_H 17 #define OHOS_FORM_FWK_FORM_HOST_DELEGATE_INTERFACE_H 18 19 #include <string> 20 #include "form_instance.h" 21 #include "iremote_broker.h" 22 #include "running_form_info.h" 23 #include "want.h" 24 25 namespace OHOS { 26 namespace AppExecFwk { 27 using Want = OHOS::AAFwk::Want; 28 class IFormHostDelegate : public OHOS::IRemoteBroker { 29 public: 30 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.aafwk.IFormHostDelegate"); 31 32 /** 33 * @brief The form router event. 34 * @param want The want to start ability, this value is same with the fms router event. 35 */ 36 virtual int32_t RouterEvent(const int64_t formId, const Want &want) = 0; 37 38 enum class Message { 39 // ipc id for form router proxy (4002) 40 FORM_ROUTER_PROXY_MGR = 4002, 41 }; 42 }; 43 } // namespace AppExecFwk 44 } // namespace OHOS 45 46 #endif // OHOS_FORM_FWK_FORM_HOST_DELEGATE_INTERFACE_H