193360723Sopenharmony_ci/* 293360723Sopenharmony_ci * Copyright (c) 2020 Huawei Device Co., Ltd. 393360723Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 493360723Sopenharmony_ci * you may not use this file except in compliance with the License. 593360723Sopenharmony_ci * You may obtain a copy of the License at 693360723Sopenharmony_ci * 793360723Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 893360723Sopenharmony_ci * 993360723Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1093360723Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1193360723Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1293360723Sopenharmony_ci * See the License for the specific language governing permissions and 1393360723Sopenharmony_ci * limitations under the License. 1493360723Sopenharmony_ci */ 1593360723Sopenharmony_ci 1693360723Sopenharmony_ci#ifndef OHOS_DMSFWK_INTERFACE_H 1793360723Sopenharmony_ci#define OHOS_DMSFWK_INTERFACE_H 1893360723Sopenharmony_ci 1993360723Sopenharmony_ci#include "ability_info.h" 2093360723Sopenharmony_ci#include "iunknown.h" 2193360723Sopenharmony_ci#include "want.h" 2293360723Sopenharmony_ci 2393360723Sopenharmony_ci#ifdef __cplusplus 2493360723Sopenharmony_ci#if __cplusplus 2593360723Sopenharmony_ciextern "C" { 2693360723Sopenharmony_ci#endif 2793360723Sopenharmony_ci#endif 2893360723Sopenharmony_ci#define DISTRIBUTED_SCHEDULE_SERVICE "dtbschedsrv" 2993360723Sopenharmony_ci#define DMSLITE_FEATURE "dmslite" 3093360723Sopenharmony_ci 3193360723Sopenharmony_citypedef enum { 3293360723Sopenharmony_ci DMS_EC_SUCCESS = 0, 3393360723Sopenharmony_ci DMS_EC_START_ABILITY_SYNC_SUCCESS = 1, 3493360723Sopenharmony_ci DMS_EC_START_ABILITY_ASYNC_SUCCESS = 2, 3593360723Sopenharmony_ci DMS_EC_PARSE_TLV_FAILURE = 3, 3693360723Sopenharmony_ci DMS_EC_UNKNOWN_COMMAND_ID = 4, 3793360723Sopenharmony_ci DMS_EC_GET_BMS_FAILURE = 5, 3893360723Sopenharmony_ci DMS_EC_GET_BUNDLEINFO_FAILURE = 6, 3993360723Sopenharmony_ci DMS_EC_CHECK_PERMISSION_FAILURE = 7, 4093360723Sopenharmony_ci DMS_EC_GET_ABILITYMS_FAILURE = 8, 4193360723Sopenharmony_ci DMS_EC_REGISTE_IPC_CALLBACK_FAILURE = 9, 4293360723Sopenharmony_ci DMS_EC_FILL_WANT_FAILURE = 10, 4393360723Sopenharmony_ci DMS_EC_START_ABILITY_SYNC_FAILURE = 11, 4493360723Sopenharmony_ci DMS_EC_START_ABILITY_ASYNC_FAILURE = 12, 4593360723Sopenharmony_ci DMS_EC_FAILURE = 13, 4693360723Sopenharmony_ci DMS_EC_INVALID_PARAMETER = 14, 4793360723Sopenharmony_ci DMS_REC_UNKNOWN_COMMAND_ID = 29360300, 4893360723Sopenharmony_ci DMS_REC_PARSER_TLV_FAIL = 29360301, 4993360723Sopenharmony_ci DMS_REC_PERMISSION_DENIED = 29360302, 5093360723Sopenharmony_ci DMS_REC_OPEN_SESSION_FAIL = 29360303, 5193360723Sopenharmony_ci DMS_REC_DEVICE_BUSY = 29360304, 5293360723Sopenharmony_ci DMS_REC_PACKET_MARSHALL_FAIL = 29360305, 5393360723Sopenharmony_ci DMS_REC_PACKET_UNMARSHALL_FAIL = 29360306, 5493360723Sopenharmony_ci DMS_REC_FREEINSTALL_FAIL = 29360307, 5593360723Sopenharmony_ci} DmsLiteCommonErrorCode; 5693360723Sopenharmony_ci 5793360723Sopenharmony_citypedef struct { 5893360723Sopenharmony_ci void (*OnResultCallback)(const void *data, int32_t ret); 5993360723Sopenharmony_ci} IDmsListener; 6093360723Sopenharmony_ci 6193360723Sopenharmony_citypedef struct { 6293360723Sopenharmony_ci int32_t uid; 6393360723Sopenharmony_ci char* bundleName; 6493360723Sopenharmony_ci} CallerInfo; 6593360723Sopenharmony_ci 6693360723Sopenharmony_citypedef struct { 6793360723Sopenharmony_ci INHERIT_IUNKNOWN; 6893360723Sopenharmony_ci int32_t (*StartRemoteAbility)(const Want *want, const CallerInfo *callerInfo, 6993360723Sopenharmony_ci const IDmsListener *callback); 7093360723Sopenharmony_ci} DmsProxy; 7193360723Sopenharmony_ci 7293360723Sopenharmony_ci#ifdef __cplusplus 7393360723Sopenharmony_ci#if __cplusplus 7493360723Sopenharmony_ci} 7593360723Sopenharmony_ci#endif 7693360723Sopenharmony_ci#endif 7793360723Sopenharmony_ci 7893360723Sopenharmony_ci#endif // OHOS_DMSFWK_INTERFACE_H 79