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 UI_EXTENSION_ABILITY_CONNECTION_H 17 #define UI_EXTENSION_ABILITY_CONNECTION_H 18 19 #include "ability_connection.h" 20 #include "ability_connect_callback_interface.h" 21 #include "ability_connect_callback_stub.h" 22 #include "iremote_object.h" 23 #include "iremote_proxy.h" 24 #include "message_parcel.h" 25 #include "nocopyable.h" 26 27 28 namespace OHOS { 29 namespace UserIam { 30 namespace UserAuth { 31 class UIExtensionAbilityConnection : public AAFwk::AbilityConnectionStub { 32 public: UIExtensionAbilityConnection(const std::string commandStr)33 UIExtensionAbilityConnection(const std::string commandStr) 34 { 35 commandStr_ = commandStr; 36 } 37 38 virtual ~UIExtensionAbilityConnection() = default; 39 40 void OnAbilityConnectDone(const AppExecFwk::ElementName &element, 41 const sptr<IRemoteObject> &remoteObject, int32_t resultCode) override; 42 void OnAbilityDisconnectDone(const AppExecFwk::ElementName &element, int32_t resultCode) override; 43 44 private: 45 std::string commandStr_; 46 }; 47 } // namespace UserAuth 48 } // namespace UserIam 49 } // namespace OHOS 50 #endif // UI_EXTENSION_ABILITY_CONNECTION_H