1 /*
2  * Copyright (c) 2021-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_FORM_FWK_FORM_BATCH_DELETE_CONNECTION_H
17 #define OHOS_FORM_FWK_FORM_BATCH_DELETE_CONNECTION_H
18 
19 #include <set>
20 
21 #include "form_ability_connection.h"
22 #include "want.h"
23 
24 namespace OHOS {
25 namespace AppExecFwk {
26 using WantParams = OHOS::AAFwk::WantParams;
27 
28 /**
29  * @class FormBatchDeleteConnection
30  * Form batch delete connection stub.
31  */
32 class FormBatchDeleteConnection : public FormAbilityConnection {
33 public:
34     FormBatchDeleteConnection(const std::set<int64_t> &formIds, const std::string &bundleName,
35         const std::string &abilityName);
36     virtual ~FormBatchDeleteConnection() = default;
37 
38     /**
39      * @brief OnAbilityConnectDone, AbilityMs notify caller ability the result of connect.
40      * @param element service ability's ElementName.
41      * @param remoteObject the session proxy of service ability.
42      * @param resultCode ERR_OK on success, others on failure.
43      */
44     void OnAbilityConnectDone(
45         const AppExecFwk::ElementName &element, const sptr<IRemoteObject> &remoteObject, int resultCode) override;
46 
47 private:
48     std::set<int64_t> formIds_;
49 
50     DISALLOW_COPY_AND_MOVE(FormBatchDeleteConnection);
51 };
52 }  // namespace AppExecFwk
53 }  // namespace OHOS
54 
55 #endif // OHOS_FORM_FWK_FORM_BATCH_DELETE_CONNECTION_H
56