1 /*
2  * Copyright (c) 2020 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_DMSLITE_FAMGR_H
17 #define OHOS_DMSLITE_FAMGR_H
18 
19 #include <stdint.h>
20 
21 #include "dmsfwk_interface.h"
22 #include "dmslite_inner_common.h"
23 #include "bundle_manager.h"
24 #include "want.h"
25 
26 #ifdef __cplusplus
27 #if __cplusplus
28 extern "C" {
29 #endif
30 #endif
31 
32 typedef struct {
33     Want *want;
34     CallerInfo *callerInfo;
35     IDmsListener *callback;
36 } RequestData;
37 
38 /**
39 * @brief Starts ability from remote
40 * @param bundleName callee bundle name, e.g. ohos.distributedschedule.helloworld
41 * @param abilityName callee ability name, e.g. MainAbility
42 * @param onStartAbilityDone called when ability started done
43 * @return DmsLiteCommonErrorCode
44 */
45 int32_t StartAbilityFromRemote(const char *bundleName, const char *abilityName,
46     StartAbilityCallback onStartAbilityDone);
47 
48 int32_t StartRemoteAbility(const Want *want, CallerInfo *callerInfo, IDmsListener *callback);
49 void FreeRequestData(const Want *want, CallerInfo *callerInfo);
50 int32_t StartRemoteAbilityInner(const Want *want, const CallerInfo *callerInfo,
51     const IDmsListener *callback);
52 #ifdef __cplusplus
53 #if __cplusplus
54 }
55 #endif
56 #endif
57 
58 #endif  // OHOS_DMSLITE_FAMGR_H