• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 FOUNDATION_APPEXECFWK_SERVICES_FORMMGR_INCLUDE_FORM_DELETE_CONNECTION_H
17 #define FOUNDATION_APPEXECFWK_SERVICES_FORMMGR_INCLUDE_FORM_DELETE_CONNECTION_H
18 
19 #include "event_handler.h"
20 #include "form_ability_connection.h"
21 
22 namespace OHOS {
23 namespace AppExecFwk {
24 
25 /**
26  * @class FormDeleteConnection
27  * Form Delete Connection Stub.
28  */
29 class FormDeleteConnection : public FormAbilityConnection {
30 public:
31     FormDeleteConnection(const int64_t formId, const std::string &bundleName, const std::string &abilityName);
32     virtual ~FormDeleteConnection() = default;
33 
34     /**
35      * @brief OnAbilityConnectDone, AbilityMs notify caller ability the result of connect.
36      * @param element service ability's ElementName.
37      * @param remoteObject the session proxy of service ability.
38      * @param resultCode ERR_OK on success, others on failure.
39      */
40     void OnAbilityConnectDone(
41         const AppExecFwk::ElementName &element, const sptr<IRemoteObject> &remoteObject, int resultCode) override;
42 
43 private:
44     int64_t formId_;
45     DISALLOW_COPY_AND_MOVE(FormDeleteConnection);
46 };
47 
48 }  // namespace AppExecFwk
49 }  // namespace OHOS
50 
51 #endif // FOUNDATION_APPEXECFWK_SERVICES_FORMMGR_INCLUDE_FORM_DELETE_CONNECTION_H