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