1 /* 2 * Copyright (c) 2022 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_DMS_FREE_INSTALL_CALLBACK_H 17 #define OHOS_DMS_FREE_INSTALL_CALLBACK_H 18 19 #include <iremote_object.h> 20 #include <iremote_stub.h> 21 22 #include "ability_info.h" 23 #include "caller_info.h" 24 #include "distributed_sched_interface.h" 25 #include "dms_free_install_callback_stub.h" 26 #include "want.h" 27 28 namespace OHOS { 29 namespace DistributedSchedule { 30 /** 31 * @class DmsFreeInstallCallback 32 * DmsFreeInstallCallback. 33 */ 34 class DmsFreeInstallCallback : public DmsFreeInstallCallbackStub { 35 public: 36 DmsFreeInstallCallback(int64_t taskId, const IDistributedSched::FreeInstallInfo& info); 37 virtual ~DmsFreeInstallCallback() = default; 38 39 /** 40 * OnInstallFinished, FreeInstall is complete. 41 * 42 * @param want, the want of the ability to start. 43 * @param requestCode the resultCode of the ability to start. 44 * @param resultCode, ERR_OK on success, others on failure. 45 */ 46 virtual void OnInstallFinished(const OHOS::AAFwk::Want& want, int32_t requestCode, int32_t resultCode) override; 47 48 private: 49 int64_t taskId_ = 0; 50 IDistributedSched::FreeInstallInfo info_; 51 }; 52 } // namespace DistributedSchedule 53 } // namespace OHOS 54 #endif // OHOS_DMS_FREE_INSTALL_CALLBACK_H 55