• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_FREE_INSTALL_I_SERVICE_CENTER_STATUS_CALLBACK_H
17 #define FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_FREE_INSTALL_I_SERVICE_CENTER_STATUS_CALLBACK_H
18 
19 #include "iremote_broker.h"
20 
21 namespace OHOS {
22 namespace AppExecFwk {
23 /**
24  * @class IServiceCenterStatusCallback
25  * IServiceCenterStatusCallback is used to notify caller ability that free install is complete.
26  */
27 class IServiceCenterStatusCallback : public IRemoteBroker {
28 public:
29     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.appexecfwk.ServiceCenterStatusCallback");
30 
31     /**
32      * @brief Will be execute when free install is complete.
33      * @param installResult the json of InstallResult
34      */
35     virtual int32_t OnInstallFinished(std::string installResult) = 0;
36 
37     /**
38      * @brief Will be execute when delayed heartbeat of free install.
39      * @param installResult the json of InstallResult
40      */
41     virtual int32_t OnDelayedHeartbeat(std::string installResult) = 0;
42 
43     /**
44      * @brief Executed when a service callback
45      * @param installResultStr The json string of InstallResult
46      */
47     virtual int32_t OnServiceCenterReceived(std::string installResultStr) = 0;
48 };
49 }  // namespace AppExecFwk
50 }  // namespace OHOS
51 #endif  // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_FREE_INSTALL_I_SERVICE_CENTER_STATUS_CALLBACK_H
52